Advertisement
Guest User

Untitled

a guest
Nov 25th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. sudo su
  2.  
  3. ls -l /dev | grep sd
  4.  
  5. fdisk /dev/xvdf
  6.  
  7. Comandos:
  8.  
  9. n
  10.  
  11. p
  12.  
  13. 1
  14.  
  15.  
  16.  
  17.  
  18.  
  19. t
  20.  
  21. fd
  22.  
  23. p
  24.  
  25. w
  26.  
  27. mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[f-i]1
  28.  
  29. watch -n1 cat /proc/mdstat
  30.  
  31. mdadm --detail /dev/md0
  32.  
  33. mkfs.ext4 /dev/md0
  34.  
  35. mkdir /mnt/raid10
  36.  
  37. mount /dev/md0 /mnt/raid10/
  38.  
  39. ls -l /mnt/raid10/
  40.  
  41. nano /etc/fstab
  42.  
  43. -> /dev/md0 /mnt/raid10 ext4 defaults 0 0
  44.  
  45. mount -av
  46.  
  47. nano /etc/fstab
  48.  
  49. -> /dev/md127 /mnt/raid10 ext4 defaults 0 0
  50.  
  51. mount -av
  52.  
  53. mysql_secure_installation
  54.  
  55. create database <nombreDB>; -> Ejemplo : create database moodledb;
  56.  
  57. grant all privileges on moodledb.* to moodlehomero@localhost identified by 'homeromoodle666';
  58.  
  59. GRANT <permisos> ON database.table TO 'user'@'localhost';
  60.  
  61. -> permisos: (EXECUTE -> solo permite ejecutar procedimientos almacenados)
  62.  
  63. ALL - CREATE - DELETE - DROP - EXECUTE - INSERT - SELECT - UPDATE
  64. Ejemplo (Crear usuario profesor:JoseLetelier(pass:profe1234) puede insertar y seleccionar de base de
  65. datos educandus):
  66.  
  67. grant SELECT, INSERT on educandus.* to JoseLetelier@localhost identified by 'profe1234';
  68.  
  69. revoke insert on educandus.* from JoseLetelier@localhost;
  70.  
  71. mkdir /var/www/moodledata
  72.  
  73. chown apache:apache /var/www/moodledata
  74.  
  75. cd /var/www/html
  76.  
  77. git clone git://git.moodle.org/moodle.git
  78.  
  79. chown -R apache:apache /var/www/html/moodle
  80.  
  81. yum remove php httpd php-cli php-xml php-common httpd-tools
  82.  
  83. yum install php56 php56-mysql php56-pdo
  84.  
  85. service httpd restart
  86.  
  87. service mysqld restart
  88.  
  89. chkconfig mysqld on
  90.  
  91. chkconfig httpd on
  92.  
  93. Web address = http://54.67.127.207/moodle
  94.  
  95. Moodle directory = /var/www/html/moodle
  96.  
  97. Data directory = /var/www/moodledata
  98.  
  99. mysql -u root -p
  100.  
  101. mysqlcheck --check moodledb --user="USUARIO" --password="XXX"
  102.  
  103. show databases;
  104.  
  105. select user,host from mysql.user;
  106.  
  107. yum install php-mysqli -y
  108.  
  109. service httpd restart
  110.  
  111. yum install php56-gd
  112.  
  113. Username = adminomer
  114.  
  115. Password = HomerAdmin$666
  116.  
  117. First name = Homer
  118.  
  119. Surname = Team
  120.  
  121. Email = <Correo>
  122.  
  123. City = Curico
  124.  
  125. Country = Chile
  126.  
  127. nano /etc/httpd/conf/httpd.conf
  128.  
  129.  
  130.  
  131. KeepAlive Off
  132.  
  133. MaxKeepAliveRequests 100
  134.  
  135. KeepAliveTimeout 15
  136.  
  137. <IfModule prefork.c>
  138.  
  139. StartServers 8
  140.  
  141. MinSpareServers 5
  142.  
  143. MaxSpareServers 20
  144.  
  145. ServerLimit 512
  146.  
  147. MaxClients 300
  148.  
  149. MaxRequestsPerChild 4000
  150.  
  151. </IfModule>
  152.  
  153. nano /etc/my.cnf
  154.  
  155.  
  156.  
  157. [mysqld]
  158.  
  159. max_connections=500
  160.  
  161. join_buffer_size = 2M
  162.  
  163. tmp_table_size = 24M
  164.  
  165. max_heap_table_size = 24M
  166.  
  167. query_cache_size = 256M
  168.  
  169. key_buffer=256M
  170.  
  171. key_buffer_size = 1332M
  172.  
  173. thread_cache_size = 4
  174.  
  175. table_cache = 500
  176.  
  177. table_open_cache = 96
  178.  
  179. innodb_buffer_pool_size = 27M
  180.  
  181. slow_query_log
  182.  
  183. local-infile=0
  184.  
  185. nano /etc/php.ini
  186.  
  187.  
  188.  
  189. realpath_cache_size = 1024k
  190.  
  191. realpath_cache_ttl=36000
  192.  
  193. max_execution_time = 300
  194.  
  195. max_input_time = 60
  196.  
  197. memory_limit = 256M
  198.  
  199. post_max_size = 30M
  200.  
  201. upload_max_filesize = 256M
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement