This is for phpMyAdmin sql databse
- sudo pacman -S nginx
- sudo systemctl start nginx
- sudo systemctl enable nginx
- sudo systemctl status nginx
- sudo pacman -S mysql
- sudo systemctl enable mysqld
- sudo systemctl start mysqld
- sudo systemctl status mysqld
- # su
- # cd /var/lib/mysql
- # rm -r *
- # sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
- sudo systemctl enable mysqld
- sudo systemctl start mysqld
- sudo systemctl status mysqld
- sudo mysql_secure_installation
- (enter;y;y;y;y;y;y)
- mysql -u root -p
- sudo pacman -S php php-fpm
- sudo systemctl enable php-fpm
- sudo systemctl start php-fpm
- sudo systemctl status php-fpm
- sudo nano /etc/nginx/nginx.conf
- location / {
- root /usr/share/nginx/html;
- index index.html index.htm index.php;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- root /usr/share/nginx/html;
- include fastcgi.conf;
- }
- sudo systemctl restart nginx
- sudo systemctl restart php-fpm
- sudo nano /usr/share/nginx/html/info.php
- <?php
- phpinfo();
- ?>
- (www) localhost/info.php
- sudo pacman -S phpmyadmin
- sudo ln -s /usr/share/webapps/phpMyAdmin/ /usr/share/nginx/html/
- (cd /usr/share/nginx/html/
- sudo chmod 777 50x.html index.html info.php)
- sudo systemctl restart nginx
- sudo systemctl restart php-fpm
- (www) http://localhost/phpMyAdmin/