- sudo passwd root
- su -
- apt-get update && apt-get upgrade -y
- apt-get install openssh-server autoconf automake apt-utils grep wget net-tools g++ git vim gawk perl dpkg-dev libncurses5-dev libldap2-dev libpam0g-dev libdb-dev cdbs libsasl2-dev debhelper libcppunit-dev libkrb5-dev comerr-dev libcap2-dev libecap3-dev libexpat1-dev libxml2-dev autotools-dev libltdl-dev pkg-config libnetfilter-conntrack-dev nettle-dev libgnutls28-dev bison build-essential cmake binutils software-properties-common devscripts equivs bison flex -y
- apt-get install squid -y
- mkdir /git; cd /git/
- git clone https://github.com/peyton-brown/Squid-Proxy-MariaDB-PHP-Signup.git; cd /
- cp /git/Squid-Proxy-MariaDB-PHP-Signup/squid.conf /etc/squid/; cp /git/Squid-Proxy-MariaDB-PHP-Signup/Whitelist-Blacklist/allowed-sites.txt /etc/squid/; cp /git/Squid-Proxy-MariaDB-PHP-Signup/Whitelist-Blacklist/blocked-sites.txt /etc/squid/
- In squid.conf (/etc/squid/squid.conf), comment or uncomment depending on your needs. If you use a whitelist, the blacklist is not necessary and vice versa, though you can still use both if needed.
- vim /etc/squid/allowed-sites.txt
- vim /etc/squid/blocked-sites.txt
- ufw allow in "Squid"
- systemctl stop squid
- squid -z
- systemctl start squid; systemctl enable squid
- systemctl status squid
Squid Wiki || Red Hat Documentation || Useful Blog Site
- apt-get install mariadb-server mariadb-client -y; service mysql restart; mysql_secure_installation
The first prompt will ask you to enter the current database root password. Since there is not one setup, press ENTER to indicate “none”.
The next prompt asks you whether you’d like to set up a database root password. This is not important for Squid but if you have a use for this you can type Y, if not Type N and then press ENTER..
From there, you can press Y and then ENTER to accept the defaults for all the subsequent questions. This will remove some anonymous users and the test database, disable remote root logins, and load these new rules so that MariaDB immediately implements the changes you have made.
- mariadb -u root -h localhost
Query Code is in the MariaDB folder.
- apt-get install apache2 php php-cgi libapache2-mod-php php-common php-pear php-mbstring php-mysql -y; ufw allow 'Apache Full'; ufw enable; ufw status
- cp -r /git/Squid-Proxy-MariaDB-PHP-Signup/PHP-Signup-Website/* /var/www/html; rm -rf /var/www/html/index.html; systemctl restart apache2
To verify Apache was installed correctly and the website has been copied over, open a web browser and type your ip into the address bar. Replace 192.168.1.254 with the IP address of your server. If you are unsure what your IP address is, run the following command:
- hostname -I
NOTE: This method only works on a local network unless you port forward. If you want to setup multiple websites on the same server use Virtual Hosts and a domain.
Phoenixnap Apache Installation Steps || Linuxize
- On Firefox, go to options
- Network Settings
- Manual proxy configuration
- Go to your Ubuntu Server and type in 'ifconfig'
- Find the inet address (ip address)
- Go back to Firefox
- Enter that ip into HTTP Proxy
- Check 'Also use this proxy for FTP and HTTPS'
- Make sure the port is the same as the one in squid.conf
- Click OK