-
Notifications
You must be signed in to change notification settings - Fork 182
Install Guide: Ubuntu 18.04
This has been adapted from the 16.04 install guide
- Nothing special, just install it
- sudo add-apt-repository ppa:ondrej/php
- sudo apt-add-repository multiverse
- sudo apt-get update
- sudo apt update
- sudo apt upgrade -y
- sudo apt autoremove -y
- sudo reboot
- sudo apt install apache2 apache2-utils
- sudo systemctl start apache2
- sudo systemctl enable apache2
- sudo chown www-data /var/www/html/ -R
- sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
- sudo add-apt-repository 'deb [arch=amd64] http://mirror.zol.co.zw/mariadb/repo/10.3/ubuntu bionic main'
- sudo apt update
- sudo apt install mariadb-server mariadb-client
- sudo systemctl start mysql
- sudo rm /etc/systemd/system/mysql.service
- sudo rm /etc/systemd/system/mysqld.service
- sudo systemctl enable mysql
- sudo mysql_secure_installation
• Enter Current Password : Just hit <Enter>
• Set root Password : (Pick a password, or select N)
• For the rest just Hit <Enter>
- sudo apt install php7.2-fpm php7.2-mysql php7.2-common php7.2-gd php7.2-json php7.2-cli php7.2-curl libapache2-mod-php7.2 -y
- sudo a2enmod php7.2
- sudo systemctl restart apache2
- sudo apt install
Regardless of which web server you use, you should add your user to the www-data group so that you may create/edit files belonging to the group. Replace $USER for your username, if you will not use the current user for nzedb.
- sudo usermod -a -G www-data $USER This requires you to log back in before it takes effect. Do so now or before the Aquiring nZEDb step.
- sudo reboot
- sudo nano /etc/mysql/my.cnf
- Add the following lines under[mysqld] section. If there is no [mysqld] section, add it above the lines below or the service will not start
### configurations by nZEDb ####
innodb_file_per_table = 1
innodb_large_prefix = 1 ## Only needed if version < 10.2.2
max_allowed_packet = 16M
group_concat_max_len = 8192
sql_mode = '' ## Needed only if you want IRCScraper to work | fix Invalid Datetime
- Save and close the file.
- sudo systemctl restart mysql
- sudo mysql -u root -p
• create database nzedb;
• grant all on nzedb.* to 'nzedb'@'localhost' identified by 'your-password';
• grant file on *.* TO 'nzedb'@'localhost';
• flush privileges;
• exit;
- mysql_tzinfo_to_sql /usr/share/zoneinfo | sudo mysql -u root mysql -p
• Ignore the "Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it." warning.
- sudo apt install apparmor-utils
- sudo aa-complain /usr/sbin/mysqld
• If you get an error after the last command, ignore it !!
- sudo apt install time unrar-free p7zip-full mediainfo lame ffmpeg zip -y
- wget http://launchpadlibrarian.net/339874908/libav-tools_3.3.4-2_all.deb
- sudo dpkg -i libav-tools_3.3.4-2_all.deb
- rm -f libav-tools_3.3.4-2_all.deb
- mkdir -p ~/new_unrar && cd ~/new_unrar
- wget http://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz
- tar -xzf rarlinux*.tar.gz
- sudo mv /usr/bin/unrar /usr/bin/unrar4
- sudo mv rar/unrar /usr/bin/unrar
- sudo chmod 755 /usr/bin/unrar
- cd ~/ && rm -rf ~/new_unrar
- cd ~
- mkdir yenc
- cd yenc
- wget https://ayera.dl.sourceforge.net/project/yydecode/yydecode/0.2.10/yydecode-0.2.10.tar.gz
- tar xzf yydecode-0.2.10.tar.gz
- cd yydecode-0.2.10
- sudo apt install gcc make
- ./configure
- make
- sudo make install
- cd ../..
- rm -rf ~/yenc
- wget https://github.com/niel/php-yenc/releases/download/v1.3.0/php7.0-yenc_1.3.0_amd64.deb
- sudo dpkg -i php7.0-yenc_1.3.0_amd64.deb
- sudo nano /etc/passwd
- replace
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
- with
www-data:x:33:33:www-data:/var/www:/bin/bash
• this allows the user to be able to login, there is no PW set (but you can run "sudo passwd www-data" to give it one, as well as "su - www-data" to work)
- sudo mkdir /var/www/nZEDb/
- sudo chown www-data:www-data /var/www/nZEDb -R
- sudo chmod g+w /var/www/nZEDb/ -R
- sudo apt install php7.2-imagick php7.2-pear php7.2-curl php7.2-gd php7.2-json php7.2-dev php7.2-gd php7.2-mbstring php7.2-xml curl -y
• Log out for this change to take effect
- logout
• Log in
- sudo apt install git
- cd /var/www/
- git clone https://github.com/nZEDb/nZEDb.git
- cd /var/www/nZEDb/
- sudo chown -R www-data:www-data /var/www/nZEDb
- sudo chmod -R 777 /var/www/nZEDb
- Follow the steps in https://github.com/nZEDb/nZEDb/wiki/Guides:-composer to install composer.
- sudo nano /etc/apache2/sites-available/nzedb.conf
• Put the following text into the file. Replace 127.0.0.1 with your Ubuntu server’s IP address. You can also use a domain name.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName 127.0.0.1
DocumentRoot "/var/www/nZEDb/www"
LogLevel warn
ServerSignature Off
ErrorLog /var/log/apache2/error.log
<Directory "/var/www/nZEDb/www">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Alias /covers /var/www/nZEDb/resources/covers
</VirtualHost>
• Save and close the file
- sudo a2dissite 000-default
- sudo a2ensite nzedb.conf
- sudo a2enmod rewrite
- sudo systemctl restart apache2
- sudo nano /etc/php/7.2/apache2/php.ini
• Change the value of max_execution_time from 30 to 120.
o max_execution_time = 120
• Change the value of memory_limit from 128M to 1024M.
o memory_limit = 1024M
• Define a timezone like America/Chicago (see http://php.net/manual/en/timezones.php)
o date.timezone = "America/Chicago"
- sudo nano /etc/php/7.2/cli/php.ini
• Change the value of max_execution_time from 30 to 120.
o max_execution_time = 120
• Change the value of memory_limit from -1 to 1024M.
o memory_limit = 1024M
• Define a timezone like America/Chicago
o date.timezone = "America/Chicago"
- sudo apt install libevent-dev build-essential git autotools-dev automake pkg-config ncurses-dev python -y
- sudo apt remove tmux -y
- git clone https://github.com/tmux/tmux.git --branch 2.0 --single-branch
- cd tmux
- ./autogen.sh
- ./configure
- make -j4
- sudo make install
- make clean
- sudo apt install python-setuptools python-dev build-essential python-pip -y
- sudo apt install ca-certificates
- mysql_tzinfo_to_sql /usr/share/zoneinfo | sudo mysql -u root -p mysql
- mkdir -p /var/www/nZEDb/resources/tmp/unrar
- sudo chmod -R 777 /var/www/nZEDb/
- sudo chown -R www-data:www-data /var/www/nZEDb/
- your-server-ip/install or your-domain.com/install
- use /etc/ssl/certs/ca-certificates.crt as the ca bundle path
- cd /var/www/nZEDb/cli
- php data/predb_import_daily_batch.php 0 local true
- cd /var/www/nZEDb/
- cp configuration/ircscraper_settings_example.php configuration/ircscraper_settings.php
- vi configuration/ircscraper_settings.php
• Change $username to the username you want.
- cd /var/www/nZEDb/misc/update/nix/tmux/
- php start.php