ps4pro配三星或者夏普电视玩ps4pro的显示器可以吗

CentOS 6.6下编译安装PostgreSQL9.4.1及phpPgAdmin配置_数据库技术_Linux公社-Linux系统门户网站
你好,游客
CentOS 6.6下编译安装PostgreSQL9.4.1及phpPgAdmin配置
来源:Linux社区&
作者:Linux
安装前准备
# yum install readline-devel zlib-devel
下载源码并解压、编译安装
# wget https://ftp.postgresql.org/pub/source/v9.4.1/postgresql-9.4.1.tar.bz2 # tar -xjvf postgresql-9.4.1.tar.bz2 # cd postgresql-9.4.1 # ./configure # make # make install -------------------------------------- 添加用户 (因为下面创建database cluster时不能用root帐号)# useradd postgres # passwd postgres 建立好database cluster目标文件夹 # mkdir -p /mnt/data/pgsql
# chown -R postgres /mnt/data/pgsql
环境变量设置 # su - postgres $ vi .bash_profile # postgres PGDATA=/mnt/data/pgsql PATH=/usr/local/pgsql/bin:$PATH export PGDATA PATH 让环境变量生效 $ source .bash_profile -------------------------------------- 创建database cluster $ pg_ctl initdb WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: & & /usr/local/pgsql/bin/postgres -D /mnt/data/pgsql or & & /usr/local/pgsql/bin/pg_ctl -D /mnt/data/pgsql -l logfile start 启动数据库实例 设置好PGDATA环境变量后,可以不带-D选项 $ pg_ctl start -l /mnt/data/pgsql/pgsql.log 关闭数据库实例
$ pg_ctl stop开启远程连接$ cd /mnt/data/pgsql/$ vi pg_hba.conf& &
# IPv4 local connections:& & host& & all& & & & & &
all& & & & & &
0.0.0.0/0& & & & & & &
trust$ vi postgresql.conflisten_addresses = '*'配置防火墙$ su - root
# vi /etc/sysconfig/iptables-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT
# service iptables restart
配置phppgadmin到http://phppgadmin.sourceforge.net/doku.php下载5.1版本解压到站点目录下,并重命名为pgadmin# cd pgadmin# vim conf/config.inc.php$conf['servers'][0]['host'] = '127.0.0.1';$conf['servers'][0]['port'] = 5432;$conf['servers'][0]['pg_dump_path'] = '/usr/local/pgsql/bin/pg_dump';$conf['servers'][0]['pg_dumpall_path'] = '/usr/local/pgsql/bin/pg_dumpall';$conf['extra_login_security'] = false保存后,访问该路径,输入用户名和密码即可访问。
------------------------------------华丽丽的分割线------------------------------------
如何在 7/6.5/6.4 下安装PostgreSQL 9.3 与 phpPgAdmin&
CentOS 6.3环境下yum安装PostgreSQL 9.3
PostgreSQL缓存详述
Windows平台编译 PostgreSQL
下LAPP(Linux+Apache+PostgreSQL+PHP)环境的配置与安装
Ubuntu上的phppgAdmin安装及配置
CentOS平台下安装PostgreSQL9.3
PostgreSQL配置Streaming Replication集群
------------------------------------华丽丽的分割线------------------------------------
PostgreSQL 的详细介绍:PostgreSQL 的下载地址:
本文永久更新链接地址:
相关资讯 & & &
& (08月14日)
& (11/19/:39)
& (04/04/:01)
& (12/21/:39)
& (04/04/:59)
& (10/04/:13)
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款Installing PostgreSQL 9.4 And phpPgAdmin In CentOS 7/6.5/6.4 - 推酷
Installing PostgreSQL 9.4 And phpPgAdmin In CentOS 7/6.5/6.4
Share this Article:
Introduction
is a powerful, open-source object-relational database system. It runs under all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS, Solaris, Tru64), and Windows OS.
PostgreSQL 9.4 has been released last week with major enhancements, fixes, and features. Read what is new in PostgreSQL 9.4
In this handy tutorial, let us see how to install PostgreSQL 9.4 on CentOS 7/6.5/6.4 server.
Install PostgreSQL
Go to the PostgreSQL repository
, and add the PostgreSQL 9.4 repository depending upon your server architecture.
For CentOS 6.x 32bit:
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-i386/pgdg-centos94-9.4-1.noarch.rpm
For CentOS 6.x 64bit:
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
For CentOS 7 64bit:
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm
Update the repository list using command:
yum update
Now, Install postgresql with the following command:
yum install postgresql94-server postgresql94-contrib
Initialize postgresql database using following command:
On CentOS 6.x systems:
service postgresql-9.4 initdb
On CentOS 7 systems:
/usr/pgsql-9.4/bin/postgresql94-setup initdb
Then, start postgresql service and make it to start automatically on every reboot.
On CentOS 6.x systems:
service postgresql-9.4 start
chkconfig postgresql-9.4 on
On CentOS 7 systems:
systemctl enable postgresql-9.4
systemctl start postgresql-9.4
Adjust Iptables/Firewall
Next, adjust iptables to access postgresql from remote systems.
On CentOS 6.x systems:
vi /etc/sysconfig/iptables
Add the following line:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
Save and exit the file. Restart iptables service.
service iptables restart
On CentOS 7 systems:
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
Access PostgreSQL command prompt
The default database name and database user are “postgres” . Switch to postgres user to perform postgresql related operations:
su - postgres
To login to postgresql, enter the command:
Sample Output:
psql (9.4.0)
Type &help& for help.
postgres=#
To exit from posgresql prompt, type \q following by quit to return back to the Terminal.
Set “postgres” user password
Login to postgresql prompt,
su - postgres
.. and set postgres password with following command:
postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# \q
To install PostgreSQL Adminpack, enter the command in postgresql prompt:
postgres=# CREATE EXTENSION
CREATE EXTENSION
Create New User and Database
For example, let us create a new user called “senthil” with password “centos” , and database called “mydb” .
Switch to postgres user:
su - postgres
Create user senthil .
$ createuser senthil
Create database:
$ createdb mydb
Now, login to the psql prompt, and set password and Grant access to the database mydb for senthil :
psql (9.4.0)
Type &help& for help.
postgres=# alter user senthil with encrypted password 'centos';
ALTER ROLE
postgres=# grant all privileges on data
postgres=#
Delete Users and Databases
To delete the database,&switch to postgres user:
su - postgres
Enter command:
$ dropdb &database-name&
To delete a user, enter the following command:
$ dropuser &user-name&
Configure PostgreSQL-MD5 Authentication
MD5 authenticationrequires the client to supply an MD5-encrypted password for authentication. To do that, edit /var/lib/pgsql/9.4/data/pg_hba.conf file:
vi /var/lib/pgsql/9.4/data/pg_hba.conf
Add or Modify the lines as shown below
# &local& is for Unix domain socket connections only
# IPv4 local connections:
127.0.0.1/32
192.168.1.0/24
# IPv6 local connections:
Restart postgresql service to apply the changes:
On CentOS 6.x systems:
service postgresql-9.4 restart
On CentOS 7 systems:
systemctl restart postgresql-9.4
Configure PostgreSQL-Configure TCP/IP
By default, TCP/IP connection is disabled, so that the users from another computers can’t access postgresql. To allow to connect users from another computers, Edit file /var/lib/pgsql/9.4/data/postgresql.conf :
vi /var/lib/pgsql/9.4/data/postgresql.conf
Find the lines:
#listen_addresses = 'localhost'
#port = 5432
Uncomment both lines, and set the IP address of your postgresql server or set ‘*’ to listen from all clients as shown below:
listen_addresses = '*'
port = 5432
Restart postgresql service to save changes:
On CentOS 6.x systems:
/etc/init.d/postgresql-9.4 restart
On CentOS 7 systems:
systemctl restart postgresql-9.4
Manage PostgreSQL with phpPgAdmin
is a web-based administration utility written in PHP for managing PosgreSQL.
phpPgAdmin is available only in PostgreSQL RPM repository. If you didn’t add PostgreSQL repository, you should add EPEL repository.
Follow the below link to install EPEL repository on CentOS 6.x.
For CentOS 7, refer the following link.
Or, simply enter the following command:
yum install epel-release
Update the repository using command:
yum update
Now, Install phpPgAdmin, enter the following command:
yum install phpPgAdmin httpd
Note:phpPgAdmin is case sensitive. Use upper and lower cases properly as shown in the above command.
By default, you can access phppgadmin using http://localhost/phpPgAdmin from your local system only. To access remote systems, do the following.
Edit file /etc/httpd/conf.d/phpPgAdmin.conf :
vi /etc/httpd/conf.d/phpPgAdmin.conf
Make the changes as shown below in the bold letters.
Alias /phpPgAdmin /usr/share/phpPgAdmin
&Location /phpPgAdmin&
&IfModule mod_authz_core.c&
# Apache 2.4
Require all granted
&/IfModule&
&IfModule !mod_authz_core.c&
# Apache 2.2
Order deny,allow
Allow from all
# Allow from .
&/IfModule&
&/Location&
Start or Restart Apache service:
On CentOS 6.x systems:
service httpd start
chkconfig httpd on
On CentOS 7 systems:
systemctl enable httpd
systemctl start httpd
Configure phpPgAdmin
Edit file /etc/phpPgAdmin/config.inc.php , and do the following changes. Most of these options are self-explanatory. Read them carefully to know why do you change these values.
vi /etc/phpPgAdmin/config.inc.php
Find the following line:
$conf['servers'][0]['host'] = '';
Change it as shown below:
$conf['servers'][0]['host'] = 'localhost';
And find the line:
$conf['extra_login_security'] =
Change the value to false :
$conf['extra_login_security'] =
Find the line:
$conf['owned_only'] =
Set the value as true .ru
$conf['owned_only'] =
Save and close the file. Restart postgresql service and Apache services.
On CentOS 6.x systems:
service postgresql-9.4 restart
service httpd restart
On CentOS 7 systems:
systemctl restart postgresql-9.4
systemctl restart httpd
Now open your browser and navigate to http://ip-address/phpPgAdmin . You will see the following screen.
Login with users that you’ve created earlier. I already have created a user called “senthil” with password “centos” before, so I log in with user “senthil”.
You may get an error called: Login failed .
This is because SELinux might restrict the users to log in to the PostgreSQL. Just enter the following command to get rid of this error.
setsebool -P httpd_can_network_connect_db 1
Now, you’ll be able to log in to the Dashboard without any problems.
This is how my phpPgAdmin dashboard looked.
Log in with postgres user:
That’s it. Now you’ll able to create, delete and alter databases graphically using phpPgAdmin easily.
For questions please refer to our Q/A forum at :
Share this Article:
已发表评论数()
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
标题不准确
排版有问题
主题不准确
没有分页内容
图片无法显示
视频无法显示
与原文不一致

我要回帖

更多关于 ps4 pro配什么显示器 的文章

 

随机推荐