{"id":17117,"date":"2015-05-13T14:19:38","date_gmt":"2015-05-13T19:19:38","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17117"},"modified":"2022-12-12T06:29:01","modified_gmt":"2022-12-12T12:29:01","slug":"how-to-install-open-source-social-network-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-open-source-social-network-on-a-centos-7-vps\/","title":{"rendered":"How to install Open Source Social Network on a CentOS 7 VPS"},"content":{"rendered":"
Open Source Social Network or simply OSSN is PHP based social networking application. Using OSSN you can create your own social network website and build relationships with your members. In this article we will explain how to install OSSN on a CentOS 7 VPS<\/a> with Apache, MariaDB and PHP.<\/p>\n <\/p>\n The installation is pretty simple. In order to run Open Source Social Network, your server needs to meet the several requirements Log in to your server as user root and make sure that all service are up to date by executing the following command<\/p>\n Install MariaDB database server on your CentOS 7 machine<\/p>\n Start the MariaDB database server and enable it to start on boot<\/p>\n Run the ‘mysql_secure_installation’ script to secure the database server and set your MariaDB root password<\/p>\n Log in to the MariaDB server using the ‘root’ user and create a new database and user for OSSN:<\/p>\n Next, we will install Apache web server<\/p>\n Same as we did with MariaDB, start the Apache web server and add it to automatically start on the system start-up<\/p>\n OSSN is PHP based application, so we need to install PHP among with few PHP modules<\/p>\n Go to OSSN’s official website and download the latest stable release which currently is OSSN version 2.3<\/p>\n Unpack the OSSN files to the document root directory on your server<\/p>\n This will create new ‘ossn’ directory inside the document root.<\/p>\n Change the ownership of the directory<\/p>\n To find out where is your document root directory you can use the following command<\/p>\n OSSN needs a directory for storing the uploaded files such as profile icons and photos. For security reasons we will create this directory outside of the document root directory<\/p>\n Next, create Apache virtual host for your domain. Create ‘\/etc\/httpd\/conf.d\/vhosts.conf’ directory with the following content<\/p>\n Create the virtual host<\/p>\n and finally restart Apache for the changes to take effect.<\/p>\n Now, open a web browser and head it to http:\/\/yourdomain.com to finish the OSSN installation<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Open Source Social Network for you. They are available 24\u00d77 and will take care of your request immediately. You might also want to consider reading How to Install Open Classifieds on CentOS 7<\/a>.<\/p>\n PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" Open Source Social Network or simply OSSN is PHP based social networking application. Using OSSN you can create your own … <\/p>\n
\n– PHP 5.3 or newer
\n– MySQL 5 or newer
\n– Apache web server
\n– Apache mod_rewrite
\n– PHP Function curl
\n– PHP GD Library
\n– JSON Support
\n– XML<\/p>\nyum -y update<\/pre>\n
yum install mariadb mariadb-server<\/pre>\n
systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\n
mysql -u root -p\r\nCREATE DATABASE ossn;\r\nCREATE USER 'ossnuser'@'localhost' IDENTIFIED BY 'PASSWORD';\r\nGRANT ALL PRIVILEGES ON `ossn`.* TO 'ossnuser'@'localhost';\r\nFLUSH PRIVILEGES;<\/pre>\n
yum install httpd<\/pre>\n
systemctl start httpd\r\nsystemctl enable httpd<\/pre>\n
yum install php php-gd php-xml php-common<\/pre>\n
wget https:\/\/www.opensource-socialnetwork.org\/downloads\/ossn-v2.3-1426433343.zip<\/pre>\n
unzip ossn-v2.3-1426433343.zip -d \/var\/www\/html\/<\/pre>\n
chown -R apache:apache \/var\/www\/html\/ossn<\/pre>\n
grep -i '^documentroot' \/etc\/httpd\/conf\/httpd.conf<\/pre>\n
mkdir \/var\/www\/ossndata<\/pre>\n
vim \/etc\/httpd\/conf.d\/vhosts.conf\r\n\r\nIncludeOptional vhosts.d\/*.conf<\/pre>\n
vim \/etc\/httpd\/vhosts.d\/yourdomain.com.conf\r\n\r\n<VirtualHost YOUR_SERVER_IP:80>\r\nServerAdmin webmaster@yourdomain.com\r\nDocumentRoot \"\/var\/www\/html\/yourdomain.com\"\r\nServerName yourdomain.com\r\nServerAlias www.yourdomain.com\r\nErrorLog \"\/var\/log\/httpd\/yourdomain.com-error_log\"\r\nCustomLog \"\/var\/log\/httpd\/yourdomain.com-access_log\" combined\r\n\r\n<Directory \"\/var\/www\/html\/yourdomain.com\/\">\r\nDirectoryIndex index.html index.php\r\nOptions FollowSymLinks\r\nAllowOverride All\r\nRequire all granted\r\n<\/Directory>\r\n<\/VirtualHost><\/pre>\n
systemctl restart httpd<\/pre>\n