How To Setup Your Own Twitter like Website Using StatusNet on CentOS 6.5
In this article, I use CentOS 6.5 to setup this website. My hostname and IP Address are ansh.geniusansh.com and 192.168.1.150/24, respectively. Change these values as per your setup.
Prerequisites
Install the following prerequisites to install and configure StatusNet:
U just install LAMP Server. U can also see my How to install and Configure LAMP server in CentOS 6.5.
Here I create a database ‘statusnetdb’ and user ‘statusnetuser’ with password ‘admin@123’:
[root@ansh ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.69 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database statusnetdb; Query OK, 1 row affected (0.01 sec)
Query OK, 0 rows affected (0.01 sec) mysql> GRANT ALL PRIVILEGES ON statusnetdb.* TO statusnetuser@localhost IDENTIFIED BY 'admin@123'; Query OK, 0 rows affected (0.01 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> exit Bye
IF ur firewall is on then u put below rules.
[root@ansh]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p udp -m state --state NEW --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
-A INPUT -p udp -m state --state NEW --dport 53 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 53 -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
[root@ansh]# /etc/init.d/iptables restartDisable SELinux and reboot your system:
[root@ansh ~]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Download StatusNet[root@ansh ~]# wget http://status.net/statusnet-1.1.0.tar.gzExtract the file. It will create a directory called statusnet-1.1.0 in the current directory:
[root@ansh ~]# tar zxf statusnet-1.1.0.tar.gzMove this folder to Apache document root Folder.
[root@ansh ~]# mv statusnet-1.1.0/ /var/www/html/statusnet
Set the write permissions to the following folders:
[root@ansh ~]# chmod a+w /var/www/html/statusnet/
[root@ansh ~]# chmod a+w /var/www/html/statusnet/avatar/
[root@ansh ~]# chmod a+w /var/www/html/statusnet/background/
[root@ansh ~]# chmod a+w /var/www/html/statusnet/file/
Begin Installation
Now navigate http://IP-address or Domain-name/statusnet/install.php from your browser. Enter site name, hostname, database name, database username and password etc. Click Submit.
To access your public timeline, navigate http://Ip-Address or domain-name/statusnet. Enter the username and password.
That’s it. Now add your photos, update status, invite friends and colleagues. Read more about how to use StatusNet in the official Documentation.
Comments
Post a Comment