Advertisement
Dolphincute

RO CENTOS GUIDE

Mar 7th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. // CONFIG VPS!
  2.  
  3. 1 - sudo yum update
  4.  
  5. 2 - sudo yum install centos-release-scl
  6.  
  7. 3 - sudo yum -y install devtoolset-7-gcc* scl enable devtoolset-7 bash
  8.  
  9. 4 - sudo yum -y install mariadb mariadb-devel mariadb-server pcre-devel zlib-devel git make
  10.  
  11. 5 - sudo yum -y install dos2unix gdb nano screen unzip wget zip
  12.  
  13. 6 - sudo yum -y update
  14.  
  15. 7 - sudo systemctl start mariadb
  16.  
  17. 8 - sudo mysql_secure_installation //ANNOTATION //enter //pass //y enter 4x
  18.  
  19. 8.1 - sudo systemctl enable mariadb
  20.  
  21. 9 - sudo yum -y install httpd
  22.  
  23. 10 - sudo systemctl start httpd.service
  24.  
  25. 11 - sudo systemctl enable httpd.service
  26.  
  27. 12 - sudo yum -y install php php-mysql
  28.  
  29. 13 - sudo systemctl restart httpd.service
  30.  
  31. 14 - sudo nano /var/www/html/info.php
  32. //Add this
  33. <?php
  34. phpinfo ();
  35. ?>
  36. //ANNOTATION ctl+o enter //ctrl x
  37.  
  38. 15 - sudo yum install epel-release
  39.  
  40. 16 - sudo yum install phpmyadmin
  41.  
  42. 17 - nano /etc/httpd/conf.d/phpMyAdmin.conf
  43. // Change to this
  44. Alias /phpMyAdmin /usr/share/phpMyAdmin
  45. Alias /phpmyadmin /usr/share/phpMyAdmin
  46.  
  47. #<Directory /usr/share/phpMyAdmin/>
  48. # <IfModule mod_authz_core.c>
  49. # # Apache 2.4
  50. # <RequireAny>
  51. # Require ip 127.0.0.1
  52. # Require ip ::1
  53. # </RequireAny>
  54. # </IfModule>
  55. # <IfModule !mod_authz_core.c>
  56. # # Apache 2.2
  57. # Order Deny,Allow
  58. # Deny from All
  59. # Allow from 127.0.0.1
  60. # Allow from ::1
  61. # </IfModule>
  62. #</Directory>
  63.  
  64. //Insert this
  65. <Directory /usr/share/phpMyAdmin/>
  66. Options none
  67. AllowOverride Limit
  68. Require all granted
  69. </Directory>
  70.  
  71. //ANNOTATION ctl+o enter //ctrl x
  72.  
  73. 18 - systemctl restart httpd.service
  74. yum install firewalld
  75. systemctl start firewalld
  76. systemctl status firewalld
  77. systemctl enable firewalld
  78.  
  79. 19 - //Copy all below
  80. firewall-cmd --permanent --add-port=6900/udp
  81. firewall-cmd --permanent --add-port=5121/udp
  82. firewall-cmd --permanent --add-port=6121/udp
  83. firewall-cmd --permanent --add-port=80/udp
  84. firewall-cmd --permanent --add-port=8888/udp
  85. firewall-cmd --permanent --add-port=22/udp
  86. firewall-cmd --permanent --add-port=443/udp
  87. firewall-cmd --permanent --add-port=3306/udp
  88. firewall-cmd --permanent --add-port=6900/tcp
  89. firewall-cmd --permanent --add-port=5121/tcp
  90. firewall-cmd --permanent --add-port=6121/tcp
  91. firewall-cmd --permanent --add-port=80/tcp
  92. firewall-cmd --permanent --add-port=8888/tcp
  93. firewall-cmd --permanent --add-port=22/tcp
  94. firewall-cmd --permanent --add-port=443/tcp
  95. firewall-cmd --permanent --add-port=3306/tcp
  96.  
  97. 20 - //Copy all below
  98. iptables -F
  99. iptables -A INPUT -p tcp --dport 22 -j ACCEPT
  100. iptables -A INPUT -p tcp --dport 80 -j ACCEPT
  101. iptables -A INPUT -p tcp --dport 443 -j ACCEPT
  102. iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
  103. iptables -A INPUT -p tcp --dport 6900 -j ACCEPT
  104. iptables -A INPUT -p tcp --dport 5121 -j ACCEPT
  105. iptables -A INPUT -p tcp --dport 6121 -j ACCEPT
  106. iptables -A INPUT -p tcp --dport 8888 -j ACCEPT
  107. //check ip connection
  108.  
  109. //Import emulator zip and extract
  110.  
  111. 21 - source scl_source enable devtoolset-7
  112.  
  113. 22 - chmod a+x configure
  114. //Give permission on cofigure (First time)
  115.  
  116. 23 - ./configure && make clean && make server (first time)
  117. //Cmd to compile and recompile
  118. make clean && make server (after first use this)
  119.  
  120. 24 - ./athena-start start
  121. //Start emulator
  122.  
  123. 25 - ./athena-start restart
  124. //Re-start emulator
  125.  
  126. 26 - ./athena-start stop
  127. //Stop emulator
  128.  
  129. 27 - rm -rf foldername/
  130. //Delete folder
  131.  
  132. 28 - unzip file.zip
  133. //Extract file from zip
  134.  
  135. 29 - clear
  136. //Clear messages
  137.  
  138. 30 - ls
  139. //Check folder location
  140.  
  141. 31 - cd home
  142. //Change to home directory
  143.  
  144. 32 - cd folder_name
  145. //Open that folder
  146.  
  147. //Optional
  148. 1 - git clone https://github.com/rathena/rathena.git /home/centos/rAthena
  149. //Cmd to clone rAthena emulator
  150.  
  151. 2 - git pull origin
  152. //Cmd to update emulator with com repository (Inside rAthena folder)
  153.  
  154. 3 - ./configure --enable-packetver=yourclientdate
  155. //Update Packetver
  156.  
  157. //Example
  158. ./configure --enable-packetver=20220406
  159. make clean && make server
  160.  
  161. //or add Example
  162. ..\Emulator For Online Test\src\custom\defines_pre.hpp
  163. #define PACKETVER 20220406
  164. // Behind this line #endif /* CONFIG_CUSTOM_DEFINES_PRE_HPP */
  165.  
  166. //-bash: ./athena-start: Permission denied
  167. //If see this error use
  168. 4 - chmod -R 777 /root/respect-private emulator
  169.  
  170. 5 - chmod +x configure; chmod +x athena-start;chmod a+x login-server && chmod a+x char-server && chmod a+x map-server
  171.  
  172. //Corrupt mysql privilege table Fix
  173. //Check the status of mariadb server
  174. sudo systemctl status mariadb
  175. //Stop the mariadb server
  176. sudo systemctl stop mariadb
  177. //start mysql in safe mode without grant tables
  178. sudo mysqld_safe --skip-grant-tables &
  179. //Login to mysql using root
  180. mysql -u root
  181. //Select the mysql databse
  182. USE mysql;
  183. //Update password for root
  184. UPDATE user SET password=PASSWORD("new_password") WHERE User='root';
  185. //Flushes the privileges and updates the user
  186. FLUSH PRIVILEGES;
  187. //Exit from mysql
  188. exit
  189. //Restart mariadb server
  190. sudo systemctl restart mariadb
  191.  
  192. /* 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 */
  193.  
  194. //reboot the server
  195. sudo reboot
  196.  
  197. //In case there's a problem with the permissions for root@localhost
  198. //use this after logging into mysql
  199. GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
  200. FLUSH PRIVILEGES;
  201.  
  202. sudo systemctl restart mariadb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement