Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // CONFIG VPS!
- 1 - sudo yum update
- 2 - sudo yum install centos-release-scl
- 3 - sudo yum -y install devtoolset-7-gcc* scl enable devtoolset-7 bash
- 4 - sudo yum -y install mariadb mariadb-devel mariadb-server pcre-devel zlib-devel git make
- 5 - sudo yum -y install dos2unix gdb nano screen unzip wget zip
- 6 - sudo yum -y update
- 7 - sudo systemctl start mariadb
- 8 - sudo mysql_secure_installation //ANNOTATION //enter //pass //y enter 4x
- 8.1 - sudo systemctl enable mariadb
- 9 - sudo yum -y install httpd
- 10 - sudo systemctl start httpd.service
- 11 - sudo systemctl enable httpd.service
- 12 - sudo yum -y install php php-mysql
- 13 - sudo systemctl restart httpd.service
- 14 - sudo nano /var/www/html/info.php
- //Add this
- <?php
- phpinfo ();
- ?>
- //ANNOTATION ctl+o enter //ctrl x
- 15 - sudo yum install epel-release
- 16 - sudo yum install phpmyadmin
- 17 - nano /etc/httpd/conf.d/phpMyAdmin.conf
- // Change to this
- Alias /phpMyAdmin /usr/share/phpMyAdmin
- Alias /phpmyadmin /usr/share/phpMyAdmin
- #<Directory /usr/share/phpMyAdmin/>
- # <IfModule mod_authz_core.c>
- # # Apache 2.4
- # <RequireAny>
- # Require ip 127.0.0.1
- # Require ip ::1
- # </RequireAny>
- # </IfModule>
- # <IfModule !mod_authz_core.c>
- # # Apache 2.2
- # Order Deny,Allow
- # Deny from All
- # Allow from 127.0.0.1
- # Allow from ::1
- # </IfModule>
- #</Directory>
- //Insert this
- <Directory /usr/share/phpMyAdmin/>
- Options none
- AllowOverride Limit
- Require all granted
- </Directory>
- //ANNOTATION ctl+o enter //ctrl x
- 18 - systemctl restart httpd.service
- yum install firewalld
- systemctl start firewalld
- systemctl status firewalld
- systemctl enable firewalld
- 19 - //Copy all below
- firewall-cmd --permanent --add-port=6900/udp
- firewall-cmd --permanent --add-port=5121/udp
- firewall-cmd --permanent --add-port=6121/udp
- firewall-cmd --permanent --add-port=80/udp
- firewall-cmd --permanent --add-port=8888/udp
- firewall-cmd --permanent --add-port=22/udp
- firewall-cmd --permanent --add-port=443/udp
- firewall-cmd --permanent --add-port=3306/udp
- firewall-cmd --permanent --add-port=6900/tcp
- firewall-cmd --permanent --add-port=5121/tcp
- firewall-cmd --permanent --add-port=6121/tcp
- firewall-cmd --permanent --add-port=80/tcp
- firewall-cmd --permanent --add-port=8888/tcp
- firewall-cmd --permanent --add-port=22/tcp
- firewall-cmd --permanent --add-port=443/tcp
- firewall-cmd --permanent --add-port=3306/tcp
- 20 - //Copy all below
- iptables -F
- iptables -A INPUT -p tcp --dport 22 -j ACCEPT
- iptables -A INPUT -p tcp --dport 80 -j ACCEPT
- iptables -A INPUT -p tcp --dport 443 -j ACCEPT
- iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
- iptables -A INPUT -p tcp --dport 6900 -j ACCEPT
- iptables -A INPUT -p tcp --dport 5121 -j ACCEPT
- iptables -A INPUT -p tcp --dport 6121 -j ACCEPT
- iptables -A INPUT -p tcp --dport 8888 -j ACCEPT
- //check ip connection
- //Import emulator zip and extract
- 21 - source scl_source enable devtoolset-7
- 22 - chmod a+x configure
- //Give permission on cofigure (First time)
- 23 - ./configure && make clean && make server (first time)
- //Cmd to compile and recompile
- make clean && make server (after first use this)
- 24 - ./athena-start start
- //Start emulator
- 25 - ./athena-start restart
- //Re-start emulator
- 26 - ./athena-start stop
- //Stop emulator
- 27 - rm -rf foldername/
- //Delete folder
- 28 - unzip file.zip
- //Extract file from zip
- 29 - clear
- //Clear messages
- 30 - ls
- //Check folder location
- 31 - cd home
- //Change to home directory
- 32 - cd folder_name
- //Open that folder
- //Optional
- 1 - git clone https://github.com/rathena/rathena.git /home/centos/rAthena
- //Cmd to clone rAthena emulator
- 2 - git pull origin
- //Cmd to update emulator with com repository (Inside rAthena folder)
- 3 - ./configure --enable-packetver=yourclientdate
- //Update Packetver
- //Example
- ./configure --enable-packetver=20220406
- make clean && make server
- //or add Example
- ..\Emulator For Online Test\src\custom\defines_pre.hpp
- #define PACKETVER 20220406
- // Behind this line #endif /* CONFIG_CUSTOM_DEFINES_PRE_HPP */
- //-bash: ./athena-start: Permission denied
- //If see this error use
- 4 - chmod -R 777 /root/respect-private emulator
- 5 - chmod +x configure; chmod +x athena-start;chmod a+x login-server && chmod a+x char-server && chmod a+x map-server
- //Corrupt mysql privilege table Fix
- //Check the status of mariadb server
- sudo systemctl status mariadb
- //Stop the mariadb server
- sudo systemctl stop mariadb
- //start mysql in safe mode without grant tables
- sudo mysqld_safe --skip-grant-tables &
- //Login to mysql using root
- mysql -u root
- //Select the mysql databse
- USE mysql;
- //Update password for root
- UPDATE user SET password=PASSWORD("new_password") WHERE User='root';
- //Flushes the privileges and updates the user
- FLUSH PRIVILEGES;
- //Exit from mysql
- exit
- //Restart mariadb server
- sudo systemctl restart mariadb
- /* At this point the mariadb server was not restarting. There was an issue with the mariadb pid (process id). So instead of doing sudo kill -9 <PID>. I just rebooted the server */
- //reboot the server
- sudo reboot
- //In case there's a problem with the permissions for root@localhost
- //use this after logging into mysql
- GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
- FLUSH PRIVILEGES;
- sudo systemctl restart mariadb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement