OS SUPPORT: Ubuntu 20.04.2 LTS \n \l – Server / Raspberry Pi 4
Pre-Requisites
1 – Update OS and change Host. (root)
NOTE: After change Hostname need to reboot the machine.
NOTE: Need to set a subdomain on the server for make it work well.
NOTE: Need a Static local IPV4 Need to check: (netplan or network/interface)
NOTE: New system like ubuntu 20.04 work with netplan.
NOTE: This Config is only on IPv4 if you don’t have a IPV6 Tunnel config.
root@ircd:~# apt-get clean all
root@ircd:~# apt-get clean metadata
root@ircd:~# apt-get update
root@ircd:~# apt-get install -y systemd nano
root@ircd:~# hostnamectl set-hostname irc.testnet.org
Bash PLEASE NOTE: when we say "irc.testnet.org" means your host name.
NOTE: You can use hostnamectl. if you change with. /etc/hostname need to change /etc/hosts too.
NOTE: You need to set your hostname and save file. Crt + X + Y + Intro
nano /etc/hostname
Bashadd – irc.testnet.org
nano /etc/hosts
Bashadd – 127.0.0.1 irc.testnet.org
2 – Install (byacc, flex, screen, make, cmake, zip, perl, automake, git, wget, ufw, net-tools, mlocate, gcc, oidentd, libpqxx-dev, tcl-dev, build-essential)
root@ircd:~# apt-get install -y byacc flex screen make cmake zip perl automake git wget ufw net-tools plocate gcc oidentd libpqxx-dev tcl-dev build-essential
Bash
3 – How To Configure Firewall with UFW
NOTE: FIRST NEED TO OPEN PORTS. NO ACTIVATE THE FIREWALL.
NOTE: Port need: 6667 to 7000 , 4400 , 113 , 53 , 443 , 80 , 22 , 25 , 110
NOTE: If you are running Secure SSL Smtp o a TLS. Dont need to open port 25(normal smtp).
NOTE: (Port: 465 Secure SMTP) (Port: 587 TLS SMTP )
NOTE: You are open port 22 SSHD. Because right now is on default. if you change config on /etc/ssh/sshd_config ( #Port 22 )
Need to put the same port or SSHD ssh user@domain not going to work.
-----------------------
- Check UFW Status:
-----------------------
root@ircd:~# ufw status
Status: inactive
root@ircd:~#
-----------------------
- How to open a single port: IPV4 / IPV6 TCP
-----------------------
root@ircd:~# ufw allow 4400
Rules updated
Rules updated (v6)
NOTE: How to Open a TCP / UDP Port.
NOTE: Only TCP.
NOTE: Only UDP.
NOTE: TCP + UDP.
NOTE: Deny access on TCP or UDP.
NOTE: RECOMENDATION open TCP + UDP.
root@ircd:~# ufw allow 25/tcp
root@ircd:~# ufw allow 25/udp
root@ircd:~# ufw allow 25
root@ircd:~# ufw deny 25/tcp
root@ircd:~# ufw deny 25/udp
NOTE: Open a port rank. 6667 to 7000
NOTE: this open TCP + UDP.
root@ircd:~# ufw allow 6667:7000
NOTE: you can only open TCP
root@ircd:~# ufw allow 6667:7000/tcp
NOTE: you can only open UDP
root@ircd:~# ufw allow 6667:7000/udp
-----------------------
- How to activate UFW (Ubuntu FireWall)
NOTE: NEED to open all port. DONT activate if you not got all ports open include SSHD.
-----------------------
NOTE: If you got set the open port for SSHD. Just say Y = (YES)
root@ircd:~# ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)?
Firewall is active and enabled on system startup
root@ircd:~#
-----------------------
NOTE: If you dont have the UFW activate not going to Show PORTS OPEN.
NOTE: Now we check if all the port are correct open.
root@ircd:~# ufw status
Status: active
To Action From
-- ------ ----
4400 ALLOW Anywhere
22 ALLOW Anywhere
53 ALLOW Anywhere
113 ALLOW Anywhere
110 ALLOW Anywhere
25 ALLOW Anywhere
443 ALLOW Anywhere
80 ALLOW Anywhere
6667 ALLOW Anywhere
4400 (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
53 (v6) ALLOW Anywhere (v6)
113 (v6) ALLOW Anywhere (v6)
110 (v6) ALLOW Anywhere (v6)
25 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
6667 (v6) ALLOW Anywhere (v6)
root@ircd:~#
NOTE: IPV4 on top. IPV6 on (v6)
-----------------------
NOTE: NOW we are going to work with network or netplan to make a Local Static Ipv4 IP.
NOTE: You need to have your Local IP. Some like 192.168.1.150 (Make sure because this change. 192.168.0.150 and so...)
NOTE: You need to have the Gateway some like: 192.168.1.1 (Make sure because this change. 192.168.0.1 and so...)
NOTE: You need to check if you are running on 10.0.0.1
-----------------------
root@ircd:~# apt-get install -y byacc flex screen make cmake zip perl automake git wget ufw net-tools plocate gcc oidentd libpqxx-dev tcl-dev build-essential
Bash4 – Running oidentd and making sure the port is open!
root@ircd:~# service oidentd start
Bash
NOTE: Check if the oidentd is working well!
root@ircd:~# ps aux | grep oidentd
oident 10035 0.0 0.0 5252 2188 ? Ss May20 0:00 /usr/sbin/oidentd -S -mf -l 10 -u oident -g oident -P 192.168.1.1
root 125101 0.0 0.0 6432 736 pts/0 S+ 14:46 0:00 grep --color=auto oidentd
root@ircd:~#
NOTE: Make sure you do the correct setting on UFW and open the port 113.
root@ircd:~# lsof -i :113
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
oidentd 10035 oident 4u IPv4 34614 0t0 TCP *:auth (LISTEN)
oidentd 10035 oident 5u IPv6 34615 0t0 TCP *:auth (LISTEN)
5 – Ensure you know all the info about your IP / Netmask.
NOTE: All ifconfig can change. Not going to show the same result!
NOTE: inet 192.168.1.171 <-- Is your IP.
root@ircd:~# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.171 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe51:9fc6 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:51:9f:c6 txqueuelen 1000 (Ethernet)
RX packets 1743179 bytes 387461465 (387.4 MB)
RX errors 0 dropped 26 overruns 0 frame 0
TX packets 1133358 bytes 924588260 (924.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 189668 bytes 62354281 (62.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 189668 bytes 62354281 (62.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@ircd:~#
---------------------------------
root@ircd:~# ifconfig | grep inet
inet 192.168.1.171 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe51:9fc6 prefixlen 64 scopeid 0x20<link>
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
root@ircd:~#
---------------------------------
root@ircd:~# ifconfig | grep ether
ether 08:00:27:51:9f:c6 txqueuelen 1000 (Ethernet)
root@ircd:~#
---------------------------------
root@ircd:~# ip route show
default via 192.168.1.1 dev enp0s3 proto dhcp src 192.168.1.171 metric 100
192.168.1.0/24 dev enp0s3 proto kernel scope link src 192.168.1.171
192.168.1.1 dev enp0s3 proto dhcp scope link src 192.168.1.171 metric 100
root@ircd:~#
---------------------------------
root@ircd:~# ip route show | grep default
default via 192.168.1.1 dev enp0s3 proto dhcp src 192.168.1.171 metric 100
root@ircd:~#
---------------------------------
root@ircd:~# ip route show | grep default | awk {'print $3'}
192.168.1.1
Now going forward with the IRCD install
1 – Add user GNUWORLD. + Password.
adduser gnuworld
su - gnuworld
git clone https://github.com/UndernetIRC/ircu2
cd ircu2/
./configure --prefix=/home/ircd/ircd --with-maxcon=100000
make
make install
cd
cd ircd/lib
cp example.conf ircd.conf
Bash## edit ircd.conf with your network settings.
## To test ircd.conf file for errors type:
/home/ircd/ircd/bin/ircd -k 9
Bash## if message is: “Configuration file ircd.conf checked okay.” you can proceed with starting ircd server, using:
/home/ircd/ircd/bin/ircd
BashNext up – GNUWorld compile & install
1 – Prepare the system by installing the necessary components. (tcl-dev, net-tools, libpqxx-dev)
root@ircd:~# apt-get install tcl-dev net-tools libpqxx-dev mlocate
Bash2 – Check if you have TCL installed.
root@ircd:~# /usr/bin/updatedb
root@ircd:~# locate tclConfig.sh
/root/tcl8.4.13-src/unix/tclConfig.sh
/root/tcl8.4.13-src/unix/tclConfig.sh.in
/root/tcl8.4.13-src/win/tclConfig.sh.in
/usr/lib/tclConfig.sh
/usr/lib/tcl8.6/tclConfig.sh
/usr/lib/x86_64-linux-gnu/tclConfig.sh
/usr/lib/x86_64-linux-gnu/tcl8.6/tclConfig.sh
/usr/local/lib/tclConfig.sh
Bash3 – This is the next step if you don’t have TCL installed.
NOTE: You got to install tcl-dev on pre-requisites, but don’t skip this step!!
root@ircd:~# git clone https://github.com/Shadowss/tcl8.4.13-src
root@ircd:~# cd tcl8.4.13-src/unix/
root@ircd:~/tcl8.4.13-src/unix# chmod +x configure
root@ircd:~/tcl8.4.13-src/unix# ./configure
root@ircd:~/tcl8.4.13-src/unix# make
root@ircd:~/tcl8.4.13-src/unix# make install
root@ircd:~/tcl8.4.13-src/unix# cd ..
root@ircd:~/tcl8.4.13-src# cd ..
root@ircd:~# ln -s /usr/local/lib/tclConfig.sh/usr/lib
Bash4 – Install POSTGRESQL for SQL manipulation.
NOTE: I don't recomend apt-get install : SO PLEASE! DON'T!
root@ircd:~# wget https://coder-com.universalnet.org/packages/postgresql-10.2.tar.gz
root@ircd:~# tar -zxvf postgresql-10.2.tar.gz
root@ircd:~# cd postgresql-10.2/
root@ircd:~/postgresql-10.2#
root@ircd:~/postgresql-10.2# chmod +x configure
root@ircd:~/postgresql-10.2# ./configure --with-CXX --enable-multibyte --with-tclconfig=/usr/lib --without-tk --without-readline --without-zlib
root@ircd:~/postgresql-10.2# make
root@ircd:~/postgresql-10.2# make install
root@ircd:~/postgresql-10.2# nano /etc/ld.so.conf
root@ircd:~/postgresql-10.2# cd
root@ircd:~#
Bash NOTE: In this file you need to add this line: /usr/local/pgsql/lib
NOTE: Remember to save file. Crt + X , Y + Intro
5 – Install PGTCL1.5
root@ircd:~# git clone https://github.com/Shadowss/pgtcl1.5.git
root@ircd:~# cd pgtcl1.5
root@ircd:~/pgtcl1.5# export PG_CONFIG=/usr/local/pgsql/bin/pg_config
root@ircd:~/pgtcl1.5#
root@ircd:~/pgtcl1.5# chmod +x configure
root@ircd:~/pgtcl1.5# ./configure --enable-modules=ccontrol,cservice,openchanfix --with-pgsql-home=/usr/local/pgsql --with-extra-includes=/usr/include/postgresql/
root@ircd:~/pgtcl1.5# make
root@ircd:~/pgtcl1.5# cd generic/
root@ircd:~/pgtcl1.5/generic# nano pgtclAppInit.c
Bash NOTE: This file only need to edit the <> on this part: <libpgtcl.h> change to "libpgtcl.h"
NOTE: Remember to save file. Crt + X , Y + Enter
NOTE: This script has a TRICK!! going to show an Error with:
/usr/bin/install: cannot stat `./doc/*.n': No such file or directory
NOTE: So make sure you create it first!
NOTE: Some people like to use touch or mkdir, but we recomend nano with the next trick!! :)
root@ircd:~/pgtcl1.5/generic# cd ..
root@ircd:~/pgtcl1.5#
root@ircd:~/pgtcl1.5# nano ./doc/*.n
Bash NOTE: nano ./doc/*.n (Inside that file, just write a [A] and erase all!! make sure the file is empty.
NOTE: Close Editor and going to ask for save! say YES)
NOTE: Remember to save file. Crt + X , Y + Enter
root@ircd:~/pgtcl1.5# make pgtclsh
root@ircd:~/pgtcl1.5# make install
root@ircd:~/pgtcl1.5# mv pgtclsh /usr/local/pgsql/bin
root@ircd:~/pgtcl1.5# mv libpgtcl1.5.so /usr/local/pgsql/lib
root@ircd:~/pgtcl1.5# updatedb
root@ircd:~/pgtcl1.5# ldconfig
root@ircd:~/pgtcl1.5# /usr/local/pgsql/bin/pgtclsh
Bash NOTE: This going to show something like:
%
NOTE: Crt + C and close. (all good!)
6 – Now we are going to create DATABASES!
root@ircd:~/pgtcl1.5# cd ..
root@ircd:~# mkdir /usr/local/pgsql/data
root@ircd:~# chown gnuworld.gnuworld /usr/local/pgsql/data
root@ircd:~# su - gnuworld
gnuworld@ircd:~$
gnuworld@ircd:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
Bash NOTE: In some cases the script going to show you the command to start!
NOTE: If this is not correct and the script doesn't show msg command: /usr/local/pgsql/bin/postmaster -B 64 -N 32 -i -D /usr/local/pgsql/data -o -F -h 127.0.0.1 >/dev/null 2>&1 &
CHECK NOTES!! For this --> gnuworld@ircd:~$ /usr/local/pgsql/bin/postmaster -B 64 -N 32 -i -D /usr/local/pgsql/data -o -F -h 127.0.0.1 >/dev/null 2>&1 &
NOTE: Now we got the pgsql system running!
gnuworld@ircd:~$ exit
root@ircd:~#
root@ircd:~# ls /usr/include/postgresql/libpq-fe.h
root@ircd:~#
Bash7 – Now we are going to download the GNUWorld!
root@ircd:~#
root@ircd:~# su - gnuworld
gnuworld@ircd:~$
gnuworld@ircd:~$ git clone https://github.com/UndernetIRC/gnuworld.git
gnuworld@ircd:~$ cd gnuworld/
gnuworld@ircd:~/gnuworld$
gnuworld@ircd:~/gnuworld$ pwd
gnuworld@ircd:~/gnuworld$
gnuworld@ircd:~/gnuworld$ chmod +x configure
gnuworld@ircd:~/gnuworld$ ./configure --enable-modules=ccontrol,cservice,openchanfix --with-pgsql-home=/usr/local/pgsql --with-extra-includes=/usr/include/postgresql/
gnuworld@ircd:~/gnuworld$ cd mod.cservice
gnuworld@ircd:~/gnuworld/mod.cservice$
nano cservice_config.h
Bash(we will enable features and change some config.)
change: #undef USE_NEWPASS by #define USE_NEWPASS
change: #undef ALLOW_HELLO by #define ALLOW_HELLO
change: #define IPR_DEFAULT_REJECT by #undef IPR_DEFAULT_REJECT
NOTE: Those are mandatory if you wonĀ“t install cservice site. Once modified you save it CTRL+O & X)
gnuworld@ircd:~/gnuworld/mod.cservice$ cd ..
gnuworld@ircd:~/gnuworld$ <-- We are here again.
gnuworld@ircd:~/gnuworld$ make
gnuworld@ircd:~/gnuworld$ make install
Bash NOTE: NOW we going to create SQL and import .sql files inside the database!
NOTE: In this step we still in the dir: /home/gnuworld/gnuworld NOW going to enter in the same dir in DOC directory.
gnuworld@ircd:~/gnuworld$ cd doc/
gnuworld@ircd:~/gnuworld/doc$
gnuworld@ircd:~/gnuworld/doc$ pwd
/home/gnuworld/gnuworld/doc
gnuworld@ircd:~/gnuworld/doc$
Bash NOTE: Have to create STEP BY STEP!! or it will not work!
NOTE: Some people like to edit the cservice.addme.sql for a New user (Admin + md5 password.)
NOTE: If you stay in the default version you are going to login with:
User: Admin
Pass: temPass
NOTE: You can edit this info or not!
NOTE: If you edit. cservice.addme.sql User and change from Admin to custom user.
You have to edit. chanfix.addme.sql, cservice.addme.sql, ccontrol.addme.sql
(Use nano): nano chanfix.addme.sql
(Use nano): nano cservice.addme.sql
(Use nano): nano ccontrol.addme.sql
BashNOTE: Create CSERVICE SQL.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/createdb --template=template0 -E=SQL_ASCII cservice
BashNOTE: Import .sql Files in DB.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < cservice.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < cservice.config.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < languages.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < language_table.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < greeting.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < cservice.help.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < cservice.web.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql cservice < cservice.addme.sql
BashNOTE: Create Cservice WEB SQL.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/createdb local_db
BashNOTE: Import .sql Files in DB.
/usr/local/pgsql/bin/psql local_db < local_db.sql
BashNOTE: Create CCONTROL SQL.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/createdb --template=template0 -E=SQL_ASCII ccontrol
BashNOTE: Import .sql Files in DB.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql ccontrol < ccontrol.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql ccontrol < ccontrol.help.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql ccontrol < ccontrol.addme.sql
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/psql ccontrol < ccontrol.commands.sql
BashNOTE: Now we are going to move to another directory URL.
gnuworld@ircd:~/gnuworld/doc$ cd ../mod.openchanfix/doc/
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ pwd
/home/gnuworld/gnuworld/mod.openchanfix/doc <-- NOTE: We are in this directory now! Make sure it's the same!
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ /usr/local/pgsql/bin/createdb chanfix
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ /usr/local/pgsql/bin/psql chanfix < chanfix.sql
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ /usr/local/pgsql/bin/psql chanfix < chanfix.languages.sql
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ /usr/local/pgsql/bin/psql chanfix < chanfix.language.english.sql
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ /usr/local/pgsql/bin/psql chanfix < chanfix.help.sql
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ /usr/local/pgsql/bin/psql chanfix < chanfix.addme.sql
Bash NOTE: NOW we have all SQL DB + .sql Imported in db.
NOTE: We need edit the file: GNUWorld.example.conf cservice.example.conf and ccontrol.example.conf
NOTE: I recommend making a copy for each file.
NOTE: If you remember the last import was in /mod.openchanfix/doc so we move to new dir.
make sure you do this! STEP by STEP!
NOTE: use cd ../../bin is the same for cd .. cd .. cd bin
we just move back 2 directory and join in bin directory
gnuworld@ircd:~/gnuworld/mod.openchanfix/doc$ cd ../../bin
gnuworld@ircd:~/gnuworld/bin$ pwd
Bash NOTE: Remember to EDIT: GNUWorld.example.conf cservice.example.conf and ccontrol.example.conf
NOTE: Make a copy for edit.
gnuworld@ircd:~/gnuworld/bin$ cp GNUWorld.example.conf GNUWorld.conf
gnuworld@ircd:~/gnuworld/bin$ cp cservice.example.conf cservice.conf
gnuworld@ircd:~/gnuworld/bin$ cp ccontrol.example.conf ccontrol.conf
Bash NOTE: If you don't edit this 3 files. GNUWorld is not going to work.
NOTE: Now we just run GNUWORLD.
gnuworld@ircd:~/gnuworld/bin$ ./gnuworld -f GNUWorld.conf
Bash
To login to X type next command :
/msg [email protected] login Admin temPass
/msg [email protected] newpass PASSWORD
-X- AUTHENTICATION SUCCESSFULL AS Admin!
NOTE: services.testnet.org is a domain!
(if you change this in the .conf file make sure you put your own domain).
Next up – CService web install
1. Prepare the system by installing the necessary components.
root@ircd:~# apt install apache2 apache2-bin apache2-data apache2-dev apache2-doc apache2-ssl-dev apache2-utils libapache2-mod-php
php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-curl php7.4-dev php7.4-gd php7.4-json php7.4-mysql php7.4-pgsql php7.4-readline
php7.4-sqlite3 php7.4-xml php7.4-xmlrpc libreadline-dev libssl-dev openssl zlib1g zlib1g-dev postfix
root@ircd:~# updatedb
root@ircd:~# nano /etc/php/7.4/apache2/php.ini
BashNOW: Go to the line 187 and change short_open_tag (from Off to On)
Save the file with (CTRL+O)
root@ircd:~# service apache2 restart
root@ircd:~# curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
Bash2. Now we are going to download the GNUWorld cservice-web!
root@ircd:~#
root@ircd:~# su - gnuworld
gnuworld@ircd:~$
gnuworld@ircd:~$ git clone https://github.com/GNUWorldChannel/cservice-web-php7.4.git
gnuworld@ircd:~$ mv cservice-web-php7.4 cservice-web
gnuworld@ircd:~$ cd cservice-web
gnuworld@ircd:~/gnuworld/cservice-web$ composer install
gnuworld@ircd:~/gnuworld/cservice-web$ cd php_includes
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$ cp config.inc.dist config.inc
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$ cp cmaster.inc.dist cmaster.inc
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$ cp blackhole.inc.dist blackhole.inc
EDIT: inc files (With your own values)
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$ cd ..
gnuworld@ircd:~/gnuworld/cservice-web/ cd ..
gnuworld@ircd:~/gnuworld$
Bash3. Now we are back to root user, for some user permission.
gnuworld@ircd:~/gnuworld$ su
root@ircd:~# cd /var/www/html/
root@ircd:/var/www/html#
root@ircd:/var/www/html# chmod 711 ~gnuworld
root@ircd:/var/www/html# chmod 711 ~gnuworld/cservice-web
root@ircd:/var/www/html# chmod 755 ~gnuworld/cservice-web/php_includes
root@ircd:/var/www/html# chmod 644 ~gnuworld/cservice-web/php_includes/config.inc
root@ircd:/var/www/html# chmod 755 ~gnuworld/cservice-web/docs/gnuworld/
root@ircd:/var/www/html# ln -s /home/gnuworld/cservice-web/docs/gnuworld
root@ircd:/var/www/html# cd ..
root@ircd:/var/www# cd ..
root@ircd:/var# cd ..
root@ircd~#
root@ircd~# cd /etc/apache2/sites-enabled
root@ircd~# nano 000-default.conf
(check the correct shortcut there where is located cservice-web.)
Bash4. We back again into the gnuworld user
root@ircd:~# su - gnuworld
gnuworld@ircd:~/gnuworld$ cd /gnuworld/cservice-web/php_includes
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$
NOTE: This entry is for the first username created in the db. (Admin or your custom username)
NOW: nano ipr.sql
Write your own ip. We show you as an example the first entry if you are trying to access locally.
insert into ip_restrict (id, user_id, added_by, added, type, expiry, value) values (1, 1, 1, now()::abstime::int4, 1, 0, '192.168.1.0/24');
Save the file with (CTRL+O)
With the gnuworld running, perform:
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$ /usr/local/pgsql/bin/psql -h 127.0.0.1 cservice < ipr.sql
Bash NOW you are able to login into cservice-web with Admin + temPass if you didnĀ“t change it with the ip provided.
You can add more ips from user edit via web, so no need to use twice ipr.sql.
I wish there was someone that would just make a package that would install all this without all the hoops you have to do in order to get all to work semi-decently….