Guide: Installing Oxwall on CentOS 7
Oxwall is a free, open-source platform designed to help you create your own social networking site. This step-by-step tutorial shows how to deploy Oxwall on a CentOS 7 server.
Requirements Before You Start
- A CentOS 7 server
- Access to a user account with sudo privileges
Step 1: Bring the System Up to Date
First, log in using your sudo-enabled user account. Then, update your system to ensure everything is current:
sudo yum install epel-release -y
sudo yum update -y
sudo shutdown -r now
Once your server has restarted, sign in again with the same sudo user credentials to move on.
Step 2: Set Up Apache Web Server
Oxwall requires a web server to function properly. In this example, we’ll install Apache 2.4 using the YUM package manager:
sudo yum install httpd -y
If you’re setting this up in a live environment, it’s recommended to disable the default Apache welcome page:
sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
Additionally, to enhance security, configure Apache to hide directory paths from browser users:
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
Finally, launch and activate the Apache service so it starts automatically after reboots:
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
Step 3: Install and Configure MariaDB
Oxwall stores all data in a MySQL-compatible database, so you’ll need to install MariaDB on your CentOS 7 system. Use the following command to do this via YUM:
sudo yum install mariadb mariadb-server -y
Now start and enable the MariaDB service so it launches on system boot:
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Next, secure your MariaDB setup using the built-in script:
sudo /usr/bin/mysql_secure_installation
When prompted, follow these answers to tighten your database security. Make sure to choose a strong, unique password:
Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Step 4: Install PHP 5.6 with Required Modules
Oxwall is compatible with PHP versions 5.5 and 5.6. Since PHP 5.5 is no longer supported, you can proceed by installing PHP 5.6 via the IUS repository.
First, add the IUS YUM repository:
cd
wget https://centos7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release.rpm
Then, use the repository to install PHP 5.6 along with all necessary extensions for running Oxwall:
sudo yum install php56u php56u-pdo php56u-xml php56u-mbstring php56u-common php56u-cli php56u-mysqlnd php56u-xmlrpc php56u-mcrypt php56u-gd curl libcurl-devel -y
Finally, restart the Apache service to activate the new PHP modules:
sudo systemctl restart httpd.service
Step 5: Download the Oxwall Package
To obtain the most recent version of Oxwall, visit the official download page. At the time this guide was written, the latest version available is 1.8.4.1. Execute the following commands to download and unpack it:
cd
wget --no-check-certificate https://developers.oxwall.com/dl/oxwall-1.8.4.1.zip
sudo yum install unzip -y
unzip oxwall-1.8.4.1.zip -d oxwall
sudo mv oxwall /var/www/html && sudo chown apache:apache -R /var/www/html/*
Step 6: Configure Apache with a Virtual Host
Create a new Apache virtual host configuration file for your Oxwall website using the vi
editor:
sudo vi /etc/httpd/conf.d/oxwall.conf
Insert the following configuration into the file you just opened:
<VirtualHost *:80>
ServerName oxwall.example.com
DocumentRoot /var/www/html/oxwall
<Directory /var/www/html/oxwall>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Save and exit the file with:
:wq!
Restart Apache to activate the changes:
sudo systemctl restart httpd.service
Step 7: Set Up a MariaDB Database for Oxwall
Access the MySQL shell with the root account by using the command below. Enter the password you previously defined during the secure setup process:
mysql -u root -p
Once inside the MySQL prompt, create a database and assign a dedicated user with full access to it. Replace the example credentials with your own secure values:
CREATE DATABASE oxwall;
CREATE USER 'oxwalluser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON oxwall.* TO 'oxwalluser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
Step 8: Open Firewall Port for HTTP
In order to make your Oxwall website accessible to visitors, you need to allow HTTP traffic through the firewall on port 80:
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload
Step 9: Finalize the Oxwall Installation Using a Browser
Open your web browser and navigate to your server’s IP address, for example: http://203.0.113.1
. This will direct you to the site configuration page. Enter the following required details:
Website Information
- Title: <Site Name>
- Tagline: <Site description>
- URL: http://203.0.113.1/
- Root directory: /var/www/html/oxwall/
Admin Account Details
- Email: <admin@example.com>
- Username: <admin’s username>
- Password: <admin’s password>
Once the required fields are filled in, press the CONTINUE button to proceed to the database configuration screen. Enter your database credentials:
- Host: localhost
- User: oxwalluser
- Password: yourpassword
- Database Name: oxwall
- Table prefix: ow_
Click CONTINUE again to reach the final installation step. The wizard will now prompt you to set up a cron job, which you’ll do in your SSH terminal:
sudo crontab -e
Then insert the following line into your crontab file:
* * * * * /usr/bin/php /var/www/html/oxwall/ow_cron/run.php
Save and exit with:
:wq!
Finally, go back to your browser and click the CONTINUE button to complete the installation. You can now access your Oxwall site or fine-tune settings from the admin dashboard.
Conclusion
By following this comprehensive tutorial, you’ve successfully installed and configured the Oxwall social networking platform on a CentOS 7 server. You’re now ready to explore the features and tailor your site to fit your community’s needs.