====== Install and Configure Content Management System & Wiki System====== This page will show how to install the WordPress [[whatiscms|Content Management System]]. **Note: This is a guide on how to install and configure CMS and Wiki System on localhost.** ----- To install and configure WordPress and DokuWiki on a Debian system, each with its own directory (localhost/wordpress and localhost/dokuwiki), follow these steps: 1. Before starting, ensure your Debian system is up to date. sudo apt update sudo apt upgrade {{::cms1.png?nolink&600|}} 2. Install packages needed for both CMS and Wiki. sudo apt install apache2 mariadb-server php php-mysql php-xml php-gd php-mbstring php-curl unzip -y {{::cms2.png?nolink&600|}} * **Apache**: Web server. * **MariaDB**: Database server. * **PHP**: Scripting language for WordPress and DokuWiki. * **unzip**: To extract WordPress and DokuWiki files. 3. Secure your MariaDB installation and create databases for WordPress and DokuWiki. sudo mysql_secure_installation Follow the prompts to set a root password and secure the database. \\ {{::cms3.png?nolink&600|}} 4. Log in to MariaDB. sudo mysql -u root -p {{::cms4.png?nolink&600|}} 5. Create database and users: CREATE DATABASE wordpress; CREATE DATABASE dokuwiki; CREATE USER 'eusoffwp'@'localhost' IDENTIFIED BY 'eusoff*A'; CREATE USER 'eusoffdw'@'localhost' IDENTIFIED BY 'eusoff*A'; GRANT ALL PRIVILEGES ON wordpress.* TO 'eusoffwp'@'localhost'; GRANT ALL PRIVILEGES ON dokuwiki.* TO 'eusoffdw'@'localhost'; FLUSH PRIVILEGES; EXIT; {{::cms5.png?nolink&600|}} ===== WordPress ===== 6. Download WordPress. cd /var/www/html sudo wget https://wordpress.org/latest.tar.gz {{::cms6.png?nolink&600|}} {{::cms7.png?nolink&600|}} 7. Extract WordPress. sudo tar -xvzf latest.tar.gz {{::cms8.png?nolink&600|}} 8. Remove the .tar file. sudo rm latest.tar.gz {{::cms9.png?nolink&600|}} 9. Set permissions of WordPress directory sudo chown -R www-data:www-data /var/www/html/wordpress sudo chmod -R 755 /var/www/html/wordpress {{::cms10.png?nolink&600|}} 10. Configure WordPress by opening browser and go to http://localhost/wordpress. {{::cms11.png?nolink&600|}} {{::cms12.png?nolink&600|}} 11. Follow the WordPress installation wizard. * Database Name: ''wordpress'' * Username: ''eusoffwp'' * Password: ''eusoff*A'' * Database Host: ''localhost'' * Table Prefix: ''wp_'' Click ''Submit'' \\ {{::cms13.png?nolink&600|}} 12. Run the Installation. \\ {{::cms15.png?nolink&600|}} 13. Fill up information needed. \\ {{::cms16.png?nolink&600|}} \\ Once done, Install WordPress. \\ Once it in installed, it will show success. Press ''Log In''. \\ {{::cms17.png?nolink&600|}} 14. Enter the username and password setup-ed in step 13 and press ''Log In''. \\ {{::cms18.png?nolink&600|}} 15. Go to Posts and Add New Post. \\ {{::cms19.png?nolink&600|}} \\ Click Publish. \\ {{::cms20.png?nolink&600|}} {{::cms21.png?nolink&600|}} \\ It will now be displayed on localhost/wordpress main page. \\ {{::cms22.png?nolink&600|}} ===== DokuWiki ===== 16. Go to /var/www/html directory cd /var/www/html {{:cms6.png?nolink&600|}} 17. Download DokuWiki. sudo wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz {{::cms22.png?nolink&600|pic}} 18. Extract the DokuWiki file. sudo tar -xvzf dokuwiki-stable.tgz {{::cms23.png?nolink&600|pic}} 19. List directory and rename the file. ls sudo mv dokuwiki-2024-02-06b dokuwiki ls {{::cms24.png?nolink&600|pic}} 20. Remove the unextracted DokuWiki file. sudo rm dokuwiki-stable.tgz {{::cms25.png?nolink&600|pic}} 21. Set permissions. sudo chown -R www-data:www-data /var/www/html/dokuwiki sudo chmod -R 755 /var/www/html/dokuwiki {{::cms26.png?nolink&600|pic}} 22. Configure DokuWiki by opening browser and go to http://localhost/dokuwiki {{::cms27.png?nolink&600|pic}}