____ ____ _____ ____ _____ ___ _ _ ___ ____ ___ _____ _____ ____
| _ \| _ \| ____| | _ \| ____/ _ \| | | |_ _/ ___|_ _|_ _| ____/ ___|
| |_) | |_) | _| _____| |_) | _|| | | | | | || |\___ \| | | | | _| \___ \
| __/| _ <| |__|_____| _ <| |__| |_| | |_| || | ___) | | | | | |___ ___) |
|_| |_| \_\_____| |_| \_\_____\__\_\\___/|___|____/___| |_| |_____|____/ #1
----------------------------------------------------------------------------
OS SUPPORT: Ubuntu 20.04.1 LTS \n \l - Server / Raspberry Pi 4
[ by: ARI3L | rVn | y2k ] #arlington STAFF
----------------------------------------------------------------------------
HOT NEWS: 10/2020: Read about our VM called PayasOS :)
https://github.com/GNUWorldChannel/PayasOS-20.04.1
REVIEW: y2k - ARI3L
----------------------------------------------------------------------------
#1 - Update OS and change Host. (root)
NOTE: READ CSERVICE WEB section FIRST. (IF YOU WANT WEB interface working.)
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: (Linux MINT incompatible)
NOTE: This Config is only on IPv4 if you dont 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.undernet.org
PLEASE NOTE: when we say "irc.undernet.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
root@ircd:~# nano /etc/hostname
irc.undernet.org
root@ircd:~# nano /etc/hosts
127.0.0.1 irc.undernet.org
root@ircd:~# reboot
#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 mlocate gcc oidentd libpqxx-dev tcl-dev build-essential
#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 UFE 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 going to work with network or netplan for 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
-----------------------
#4 - Running oidentd and make sure the port is open!
root@ircd:~# service oidentd start
root@ircd:~#
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)
root@ircd:~#
#5 - Make sure you know all 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
root@ircd:~#
-------------------------------------------------------------------------------------------
_ ____
(_)_ __ ___ _ _|___ \
| | '__/ __| | | | __) |
| | | | (__| |_| |/ __/
The |_|_| \___|\__,_|_____| Guide #2
------------------------------------------------------------
OS SUPPORT: Ubuntu 20.04.1 LTS \n \l - Server / Raspberry Pi 4
[ by: ARI3L | rVn | y2k ]
------------------------------------------------------------
#1 - Add user GNUWORLD. + Password ask.
root@ircd:~# adduser gnuworld
#2 - Enter in GNUWORLD USER
root@ircd:~# su - gnuworld
gnuworld@ircd:~$ pwd
/home/gnuworld <-- We are in gnuworld user home folder.
gnuworld@ircd:~$
#3 - Clone ircu2 from Github.
gnuworld@ircd:~$ git clone https://github.com/UndernetIRC/ircu2.git
gnuworld@ircd:~$ cd ircu2/
gnuworld@ircd:~/ircu2 chmod +x configure
gnuworld@ircd:~/ircu2 ./configure --help (SEE the help for all config. This is a basic setup.)
gnuworld@ircd:~/ircu2 ./configure --prefix=$HOME --with-maxcon=1024 NOTE:( Maximum number of connections server will accept. --with-maxcon=1024 )
Note if you have Raspberry pi 4 use this flag ./configure --build=unknown-unknown-linux --prefix=$HOME --with-maxcon=1024
gnuworld@ircd:~/ircu2 make
gnuworld@ircd:~/ircu2 make install
#4 - Config Files for IRCD.
NOTE: Need to edit ircd.conf so you can run ircd.
gnuworld@ircd:~/ircu2$ cd ..
gnuworld@ircd:~$ ls
bin ircu2 lib
----------------------
gnuworld@ircd:~$ cd lib
gnuworld@ircd:~/lib$ ls
example.conf
----------------------
gnuworld@ircd:~/lib$ cp example.conf ircd.conf
gnuworld@ircd:~/lib$ echo "Hello World" > ircd.motd
----------------------
gnuworld@ircd:~/lib$ ls
example.conf ircd.conf ircd.motd
----------------------
gnuworld@ircd:~/lib$ cd ..
----------------------
gnuworld@ircd:~$ ls
bin ircu2 lib
----------------------
gnuworld@ircd:~$ cd bin
----------------------
gnuworld@ircd:~/bin$ ls
convert-conf ircd ircd.202005201207 umkpasswd
----------------------
gnuworld@ircd:~/bin$ ./ircd
gnuworld@ircd:~/bin$
----------------------
gnuworld@ircd:~/bin$ ps x
PID TTY STAT TIME COMMAND
10459 ? Ss 0:00 ./ircd <-- Is running!! :)
10482 pts/0 R+ 0:00 ps x
gnuworld@ircd:~/bin$
---------------------
#5 - Now we can go to mIRC.
/server ServerName:Port
/server IP:Port
-------------------------------------------------------------------------------------------
____ _ _ _ ___ __ _ _
/ ___| \ | | | | \ \ / /__ | |_ __ __| |
| | _| \| | | | |\ \ /\ / / _ \| | '__/ _` |
| |_| | |\ | |_| | \ V V / (_) | | | | (_| |
The \____|_| \_|\___/ \_/\_/ \___/|_|_| \__,_| Guide #3
------------------------------------------------------------
OS SUPPORT: Ubuntu 20.04.1 LTS \n \l - Server / Raspberry Pi 4
[ by: ARI3L | rVn | y2k ]
------------------------------------------------------------
#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
#2 - 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
root@ircd:~#
#3 - If you dont got install TCL this is the next step.
NOTE: You got install tcl-dev on pre-requisites, but dont jump 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
#4 - Install POSTGRESQL for sql manipulation.
NOTE: we dont recoment apt-get install : SO PLEASE! DONT!
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:~#
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
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 + Intro
NOTE: This script got a TRICK!! going to show a Error with:
/usr/bin/install: cannot stat `./doc/*.n': No such file or directory
NOTE: So make sure you create first! for this error dont display!
NOTE: Some people like to use touch or mkdir, but we recoment nano with the next trick!! :)
root@ircd:~/pgtcl1.5/generic# cd ..
root@ircd:~/pgtcl1.5# nano ./doc/*.n
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 + Intro
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
NOTE: This going to show some like:
%
NOTE: Crt + C and close. (This is all good!)
#6 - Now we are going to crate DATABASE !
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
NOTE: In some case the script going to show you the command for start!!
NOTE: If this is not correct! and the script dont 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 and working perfect!
NOTE: If sql start all good!! Exit!
gnuworld@ircd:~$ exit
root@ircd:~#
root@ircd:~# ls /usr/include/postgresql/libpq-fe.h
root@ircd:~#
#7 - Now We 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
/home/gnuworld/gnuworld <-- We are in the GNUWORLD folder! Inside the gnuworld USER.
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/
NOTE: For Raspberry pi4 use this: ./configure --build=unknown-unknown-linux --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
(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
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$
NOTE: Have to create STEP BY STEP!! or not going to 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
NOTE: Create CSERVICE SQL.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/createdb --template=template0 -E=SQL_ASCII cservice
NOTE: 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
NOTE: Create Cservice WEB SQL.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/createdb local_db
NOTE: Import .sql Files in DB.
/usr/local/pgsql/bin/psql local_db < local_db.sql
NOTE: Create CCONTROL SQL.
gnuworld@ircd:~/gnuworld/doc$ /usr/local/pgsql/bin/createdb --template=template0 -E=SQL_ASCII ccontrol
NOTE: 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
NOTE: Now we going to move to other 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 is 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
NOTE: NOW we got all SQL DB + .sql Imported in db.
NOTE: NOW we need edit the file: GNUWorld.example.conf cservice.example.conf and ccontrol.example.conf
NOTE: NOW recoment to make a copy for each file.
NOTE: If you remember the las 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
/home/gnuworld/gnuworld/bin <-- We are here now!
gnuworld@ircd:~/gnuworld/bin$
NOTE: Remember to EDITE: 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
NOTE: If you dont edit this 3 files. GNUWorld is not goint to work or do nothing.
NOTE: Now we just run GNUWORLD.
gnuworld@ircd:~/gnuworld/bin$ ./gnuworld -f GNUWorld.conf
NOTE: If all config was good!! you going to see the X in the channel you set etc...!
For login to X type next command :
/msg X@services.undernet.org login Admin temPass
/msg X@services.undernet.org newpass PASSWORD
NOTE: if you login and all go OK! you ill see this msg from X or the name you select!
-X- AUTHENTICATION SUCCESSFULL AS Admin!
NOTE: services.undernet.org is a domain!
(if you change this in the .conf file make sure you put your own domain).
____ _ __ __ _
/ ___|___ ___ _ ____ _(_) ___ ___ \ \ / /__| |__
| | / __|/ _ \ '__\ \ / / |/ __/ _ \____\ \ /\ / / _ \ '_ \
| |___\__ \ __/ | \ V /| | (_| __/_____\ V V / __/ |_) |
The \____|___/\___|_| \_/ |_|\___\___| \_/\_/ \___|_.__/ Guide #4
--------------------------------------------------------------------------
Test OS: Ubuntu 20.04.1 LTS \n \l - Server
[ by: ARI3L | rVn | y2k ]
--------------------------------------------------------------------------
Pay attention to the following: If any cservice-web module does not respond
or gives you problems, you should ask the official Undernet network coders,
because we can only help you install the site, but never modify the code that they wrote.
--------------------------------------------------------------------------
#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
php php-cgi php-cli php-common php-curl php-dev php-gd php-json php-mysql php-pgsql php-readline
php-sqlite3 php-xml php-xmlrpc libreadline-dev libssl-dev openssl zlib1g zlib1g-dev
root@ircd:~# updatedb
root@ircd:~# nano /etc/php/7.4/apache2/php.ini
NOW: Go to the line 187 and change short_open_tag (from Off to On)
Save the file CTRL+O
root@ircd:~# service apache2 restart
root@ircd:~# curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
#2. Now We going to download the GNUWorld cservice-web part!
root@ircd:~#
root@ircd:~# su - gnuworld
gnuworld@ircd:~$
gnuworld@ircd:~$ git clone https://github.com/UndernetIRC/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
EDIT: cp config.inc.dist config.inc (With your own values)
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$ cd ..
gnuworld@ircd:~/gnuworld/cservice-web/ cd ..
gnuworld@ircd:~/gnuworld$
#3. Now we 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.)
#4. We back again into gnuworld user
root@ircd:~# cd
root@ircd:~# su - gnuworld
gnuworld@ircd:~/gnuworld$ cd /gnuworld/cservice-web/php_includes
gnuworld@ircd:~/gnuworld/cservice-web/php_includes$
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
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 add another one.
That´s all :)
REVIEW: y2k - ARI3L