Embrace Dreams
Archive for the ‘DatabaseAndStorage’ Category
Install PostgreSQL on OpenSuse 12.1
February 6th, 2012 | admin
First,
$sudo zypper install postgresql postgresql-server pgadmin3
Start server
$sudo rcpostgresql start
Change password for postgres user
$sudo postgres -c psql postgres ALTER USER postgres WITH PASSWORD 'postgres'; \q
Error!
“IDENT authentication failed for user”
Hence, if you do not use IDENT, edit the /var/lib/pgsql/data/pg_hba.conf file and change “ident” to “md5″. Say, for instance, the lines below
local all all ident
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
to
local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
Once done,restart postgreSQL as follows:
opensuse:~ # rcpostgresql restart
Create and Delete users
To create an user
opensuse:~ # su postgres
postgresql@opensuse:~> createuser -D
for user with password
postgresql@opensuse:~> createuser -D -p
To delete user
postgresql@opensuse:~> dropuser
Build PHP 5 Development enviroment on OpenSuse 12.1
December 5th, 2011 | admin
First of all, you must have OpenSuse 12.1 installed. Then let’s start.
Install and configure MySQL
$sudo zypper install mysql mysql-client $sudo /sbin/chkconfig --add mysql $sudo /etc/init.d/mysql start $sudo mysql_secure_installation
Optional, let’s create a test database
$mysql -uroot -p $CREATE DATABASE `voicens` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Install and configure Apache2
$sudo zypper install apache2 $sudo /sbin/chkconfig --add apache2 $sudo /etc/init.d/apache2 start
Install and configure PHP5
$sudo zypper install apache2-mod_php5 $sudo /etc/init.d/apache2 restart $sudo zypper install php5-mysql php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm php5-pdo $sudo /etc/init.d/apache2 restart
cheers.