Difference between revisions of "Cups"
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <br /> | |
− | This will | + | The [http://www.amahi.org/apps/cups CUPS] web application is currently in Testing for Amahi 7 or greater. This guide is incomplete, but when finished will allow manual adding the cups printing system to a existing HDA installation. |
=== Initial system setup === | === Initial system setup === | ||
Check to see if cups is installed already. It quite often is if you installed Gnome or any other programs that might have printer support. | Check to see if cups is installed already. It quite often is if you installed Gnome or any other programs that might have printer support. | ||
Line 16: | Line 16: | ||
SpaceBar goes down 1 page. | SpaceBar goes down 1 page. | ||
Enter is the same as clicking a link, or puts a check in a box. | Enter is the same as clicking a link, or puts a check in a box. | ||
− | links http://localhost:631 | + | links <nowiki>http://localhost:631</nowiki> |
+ | |||
=== Once in links === | === Once in links === | ||
#Hit down arrow until on "Administration" then hit enter | #Hit down arrow until on "Administration" then hit enter | ||
#Hit down until the checkbox next to Allow Remote Administration is highlit, then press enter | #Hit down until the checkbox next to Allow Remote Administration is highlit, then press enter | ||
− | #Hit down until "Save Changes" is | + | #Hit down until "Save Changes" or "change settings" is highlighted, and press enter |
+ | #When asked for username and password use "root" and "yourownHDApassword" which was set while installing your hda. It seems that only user "root" save changes. | ||
#Press q to exit after changes are saved. | #Press q to exit after changes are saved. | ||
+ | |||
=== Creating the webapp === | === Creating the webapp === | ||
− | #Open the HDA Webapps configuration page | + | #Go to the apps on the dashboard and install Webapps if not installed already |
+ | #Open the HDA Webapps configuration page | ||
#Create a new webapp named cups | #Create a new webapp named cups | ||
+ | |||
=== Creating the Webapp Redirect === | === Creating the Webapp Redirect === | ||
+ | Edit the config-file using a editor like "nano". Perhaps you have to install it first: | ||
+ | su - | ||
+ | yum -y install nano | ||
+ | Now you can edit cups | ||
su - | su - | ||
nano /etc/httpd/conf.d/*cups.conf | nano /etc/httpd/conf.d/*cups.conf | ||
Go down to line 5, and add this: | Go down to line 5, and add this: | ||
− | ProxyPass / http://localhost:631/ | + | ProxyPass / <nowiki>http://localhost:631/</nowiki> |
− | ProxyPassReverse / http://localhost:631 | + | ProxyPassReverse / <nowiki>http://localhost:631/</nowiki> |
Press CTRL+X to exit and save. | Press CTRL+X to exit and save. | ||
+ | |||
== It should look like this == | == It should look like this == | ||
<br/> | <br/> | ||
<pre> <VirtualHost *:80> | <pre> <VirtualHost *:80> | ||
+ | |||
+ | ServerName cups | ||
+ | ServerAlias cups.yourdomain.net | ||
+ | |||
+ | |||
+ | |||
+ | ProxyPass / http://localhost:631/ | ||
+ | ProxyPassReverse / http://localhost:631/ | ||
+ | |||
+ | DocumentRoot /var/hda/web-apps/cups/html | ||
+ | |||
+ | <Directory "/var/hda/web-apps/cups/html"> | ||
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride AuthConfig | ||
+ | Require all granted | ||
+ | |||
+ | </Directory> | ||
+ | |||
+ | ErrorLog /var/hda/web-apps/cups/logs/error_log | ||
+ | CustomLog /var/hda/web-apps/cups/logs/access_log combined env=!d | ||
+ | |||
+ | </VirtualHost> | ||
+ | </pre> | ||
+ | === Restart httpd === | ||
+ | check that /var/hda/web-apps/cups/logs exists and is owned by apache:users | ||
+ | Then restart httpd. | ||
− | + | systemctl restart httpd.service | |
− | |||
− | + | === Testing === | |
− | + | Go to a system on your network, and try going to <nowiki>http://cups</nowiki> | |
− | + | If you have problems connecting to the CUPS web UI, it may be because your DNS Server is not set correctly. Try using IP address in your browser: | |
− | + | <nowiki>http://IP_ADDRESS:631</nowiki> (replace IP_ADDRESS with your HDA IP address) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 01:07, 25 March 2016
The CUPS web application is currently in Testing for Amahi 7 or greater. This guide is incomplete, but when finished will allow manual adding the cups printing system to a existing HDA installation.
Contents
Initial system setup
Check to see if cups is installed already. It quite often is if you installed Gnome or any other programs that might have printer support.
su - rpm -qa |grep cups
If you see cups, then you don't need the next line.
yum -y install cups
Configure cups for remote access
Install links for local access to the cups configuration website, or use whatever web browser you have if you have X installed.
yum -y install links
Navigate to the Links configuration page
Quick cheatsheet for links: Left and Right arrows go forward and backward on pages. Up and Down arrows move from one link to another SpaceBar goes down 1 page. Enter is the same as clicking a link, or puts a check in a box. links http://localhost:631
Once in links
- Hit down arrow until on "Administration" then hit enter
- Hit down until the checkbox next to Allow Remote Administration is highlit, then press enter
- Hit down until "Save Changes" or "change settings" is highlighted, and press enter
- When asked for username and password use "root" and "yourownHDApassword" which was set while installing your hda. It seems that only user "root" save changes.
- Press q to exit after changes are saved.
Creating the webapp
- Go to the apps on the dashboard and install Webapps if not installed already
- Open the HDA Webapps configuration page
- Create a new webapp named cups
Creating the Webapp Redirect
Edit the config-file using a editor like "nano". Perhaps you have to install it first:
su - yum -y install nano
Now you can edit cups
su - nano /etc/httpd/conf.d/*cups.conf
Go down to line 5, and add this:
ProxyPass / http://localhost:631/ ProxyPassReverse / http://localhost:631/
Press CTRL+X to exit and save.
It should look like this
<VirtualHost *:80> ServerName cups ServerAlias cups.yourdomain.net ProxyPass / http://localhost:631/ ProxyPassReverse / http://localhost:631/ DocumentRoot /var/hda/web-apps/cups/html <Directory "/var/hda/web-apps/cups/html"> Options Indexes FollowSymLinks MultiViews AllowOverride AuthConfig Require all granted </Directory> ErrorLog /var/hda/web-apps/cups/logs/error_log CustomLog /var/hda/web-apps/cups/logs/access_log combined env=!d </VirtualHost>
Restart httpd
check that /var/hda/web-apps/cups/logs exists and is owned by apache:users Then restart httpd.
systemctl restart httpd.service
Testing
Go to a system on your network, and try going to http://cups
If you have problems connecting to the CUPS web UI, it may be because your DNS Server is not set correctly. Try using IP address in your browser: http://IP_ADDRESS:631 (replace IP_ADDRESS with your HDA IP address)