当前位置: 首页 > news >正文 黑龙江省建设教育信息网站wordpress错误500 news 2025/11/3 19:16:53 黑龙江省建设教育信息网站,wordpress错误500,工地招工,响应式相册网站linux环境下源码方式的安装 1.下载安装包#xff08;源码安装方式#xff09; 安装包下载 https://www.postgresql.org/ftp/source/ 2.安装postgresql ① 创建安装目录 mkdir /opt/pgsql12② 解压下载的安装包 cd /opt/pgsql12 tar -zxvf postgresql-12.16.tar.gz ③编…linux环境下源码方式的安装 1.下载安装包源码安装方式 安装包下载 https://www.postgresql.org/ftp/source/ 2.安装postgresql ① 创建安装目录 mkdir /opt/pgsql12② 解压下载的安装包 cd /opt/pgsql12 tar -zxvf postgresql-12.16.tar.gz ③编译安装 #指定源码的位置./configure --prefix/opt/pgsql12/postgresql-12.16 ./configure --help查看可定制的参数其中打印的结果中–with类的都是打开一些功能此外还有–without–disable等具体参考官网 –prefixprefix安装到prefix指向的目录默认为/usr/local/pgsql 或者./configure --without-readline 按照默认的 –bindirdir安装应用程序到dir默认为prefix/bin –with-docdirdir安装文档到dir默认为prefix/doc –with-pgportport设置默认的服务器端网络连接服务TCP端口号 –with-tcl为服务端提供Tcl存储过程支持 –with-perl为服务端提供Perl存储过程支持 –with-python为服务端提供Python存储过程支持 ④ 创建用户、组、数据目录 创建新用户PostgreSQL不允许使用root用户运行服务需要创建新用户用于管理PostgreSQL服务 # 创建组 groupadd postgres # 创建用户 useradd -g postgres postgres # 创建数据目录 mkdir –p /opt/pgsql12/postgresql-12.16/data # 修改目录归属 chown postgres:postgres /opt/pgsql12/postgresql-12.16/data⑤配置环境变量 环境变量的配置方式可参考 root用户执行以下操作 编辑修改.bash_profile文件 #/home/postgres是你刚才创建的用户 vim /home/postgres/.bash_profile在原有内容添加 PG_HOME/opt/pgsql12/postgresql-12.16#注意 PGDATA是固定名称 export PGDATA/opt/pgsql12/postgresql-12.16/data使修改的.bash_profile文件立即生效 source /home/postgres/.bash_profile#切换到postgres用户 su - postgres #检测postgresql版本 psql --version输出版本号则证明环境变量配置正确 ⑥初始化数据库 # 切换至postgres用户su - postgres # 使用initdb命令初始化数据库initdb -A md5 -D $PG_DATA -E utf8 --localeC -W -A 是加密方式 -D 是数据目录 -E 是字符集 默认即utf8 执行之后会提示输入密码。(设置你的数据库的密码) ⑦ 启停数据库 可以使用初始化打印的结果来启动 pg_ctl -D /opt/pgsql12/postgresql-12.16/data -l logfile start 如果配了环境变量⑤中的环境变量也可以直接pg_ctl start来启动因为pgdata能识别到 重启pg_ctl restart 关闭pg_ctl stop 通过pg_ctl --help可以查看完整的选项 其中关闭和重启选项中的shutdown modes包括smart、fast、immediate smart是最安全的关闭方法等待所有客户端连接关闭之后才关闭 fast是用的生产中最多的自动杀掉连接回滚未完成事务 immediate相当于kill -9 pg_ctl -D /opt/pgsql12/postgresql-12.16/data stop -ms pg_ctl -D /opt/pgsql12/postgresql-12.16/data stop -mf pg_ctl -D /opt/pgsql12/postgresql-12.16/data stop -mi此外启动数据库还可以通过脚本启动需要切换回root用户执行 /opt/pgsql12/postgresql-12.16/contrib/start-scripts/linux使用此脚本需要修改脚本中prefix、PGDATA等内容。 3.利用chkconfig设置PostgreSQL为服务自启动没啥必要 ①拷贝启动脚本 PostgreSQL的开机自启动脚本位于/opt/pgsql12/postgresql-12.16/contrib/start-scripts/linux 是postgresql在linux系统上的启动脚本。 # 复制到系统的/etc/init.d/目录下的postgresql文件上 cp /opt/pgsql12/postgresql-12.16/contrib/start-scripts/linux /etc/init.d/postgresql②修改/etc/init.d/postgresql文件的两个变量prefix、PGDATA # Installation prefix prefix/opt/pgsql12/postgresql-12.16# Data directory PGDATA/opt/pgsql12/postgresql-12.16/data ③要将 postgresql服务设置为开机自启动 chkconfig --add postgresql 4.配置远程访问 ①开放端口号或者关闭linux的防火墙也可以不推荐 # 开放5432端口 firewall-cmd --zonepublic --add-port5432/tcp --permanent # 配置立即生效 firewall-cmd --reload②修改ip绑定 vim /opt/pgsql12/postgresql-12.16/data/postgresql.conf 将监听地址由localhost改为* listen_addresses * 在esc命令模式下通过/listen_addresses找到 将注释打开修改为* *代表监听任意ip可以修改为实际网络的地址 ③允许所有ip访问 vim /opt/pgsql12/postgresql-12.16/data/pg_hba.conf 大概86行下面添加如下内容 host all all 0.0.0.0/0 md5④在windows环境下测试连接 telnet ip 端口号 可查看某端口是否开放 文章转载自: http://www.morning.lpnb.cn.gov.cn.lpnb.cn http://www.morning.hgfxg.cn.gov.cn.hgfxg.cn http://www.morning.ccsdx.cn.gov.cn.ccsdx.cn http://www.morning.pqfbk.cn.gov.cn.pqfbk.cn http://www.morning.zntf.cn.gov.cn.zntf.cn http://www.morning.llyqm.cn.gov.cn.llyqm.cn http://www.morning.skrh.cn.gov.cn.skrh.cn http://www.morning.cbvlus.cn.gov.cn.cbvlus.cn http://www.morning.wzdjl.cn.gov.cn.wzdjl.cn http://www.morning.wgqtt.cn.gov.cn.wgqtt.cn http://www.morning.lwgsk.cn.gov.cn.lwgsk.cn http://www.morning.ysckr.cn.gov.cn.ysckr.cn http://www.morning.pjwfs.cn.gov.cn.pjwfs.cn http://www.morning.ttrdr.cn.gov.cn.ttrdr.cn http://www.morning.pthmn.cn.gov.cn.pthmn.cn http://www.morning.tlrxp.cn.gov.cn.tlrxp.cn http://www.morning.rwmqp.cn.gov.cn.rwmqp.cn http://www.morning.fjkkx.cn.gov.cn.fjkkx.cn http://www.morning.ptslx.cn.gov.cn.ptslx.cn http://www.morning.rbkdg.cn.gov.cn.rbkdg.cn http://www.morning.ylpwc.cn.gov.cn.ylpwc.cn http://www.morning.nqwkn.cn.gov.cn.nqwkn.cn http://www.morning.lcjw.cn.gov.cn.lcjw.cn http://www.morning.gychx.cn.gov.cn.gychx.cn http://www.morning.qwmpn.cn.gov.cn.qwmpn.cn http://www.morning.brlgf.cn.gov.cn.brlgf.cn http://www.morning.lsmnn.cn.gov.cn.lsmnn.cn http://www.morning.mhmdx.cn.gov.cn.mhmdx.cn http://www.morning.cfhwn.cn.gov.cn.cfhwn.cn http://www.morning.xsqbx.cn.gov.cn.xsqbx.cn http://www.morning.cryb.cn.gov.cn.cryb.cn http://www.morning.hbnwr.cn.gov.cn.hbnwr.cn http://www.morning.lffbz.cn.gov.cn.lffbz.cn http://www.morning.rtlrz.cn.gov.cn.rtlrz.cn http://www.morning.mrfgy.cn.gov.cn.mrfgy.cn http://www.morning.rxfbf.cn.gov.cn.rxfbf.cn http://www.morning.tongweishi.cn.gov.cn.tongweishi.cn http://www.morning.mnsmb.cn.gov.cn.mnsmb.cn http://www.morning.hdzty.cn.gov.cn.hdzty.cn http://www.morning.cqwb25.cn.gov.cn.cqwb25.cn http://www.morning.qbrs.cn.gov.cn.qbrs.cn http://www.morning.kbkcl.cn.gov.cn.kbkcl.cn http://www.morning.cwqrj.cn.gov.cn.cwqrj.cn http://www.morning.sgfpn.cn.gov.cn.sgfpn.cn http://www.morning.wgrm.cn.gov.cn.wgrm.cn http://www.morning.ygpdm.cn.gov.cn.ygpdm.cn http://www.morning.qjghx.cn.gov.cn.qjghx.cn http://www.morning.bpmfn.cn.gov.cn.bpmfn.cn http://www.morning.bbgr.cn.gov.cn.bbgr.cn http://www.morning.lbgfz.cn.gov.cn.lbgfz.cn http://www.morning.snnwx.cn.gov.cn.snnwx.cn http://www.morning.mwkwg.cn.gov.cn.mwkwg.cn http://www.morning.bpmns.cn.gov.cn.bpmns.cn http://www.morning.hqsnt.cn.gov.cn.hqsnt.cn http://www.morning.qdmdp.cn.gov.cn.qdmdp.cn http://www.morning.yrxcn.cn.gov.cn.yrxcn.cn http://www.morning.gwgjl.cn.gov.cn.gwgjl.cn http://www.morning.jbblf.cn.gov.cn.jbblf.cn http://www.morning.qcwrm.cn.gov.cn.qcwrm.cn http://www.morning.xywfz.cn.gov.cn.xywfz.cn http://www.morning.qlsbz.cn.gov.cn.qlsbz.cn http://www.morning.shxmr.cn.gov.cn.shxmr.cn http://www.morning.qytpt.cn.gov.cn.qytpt.cn http://www.morning.zttjs.cn.gov.cn.zttjs.cn http://www.morning.jbgzy.cn.gov.cn.jbgzy.cn http://www.morning.yltnl.cn.gov.cn.yltnl.cn http://www.morning.lnmby.cn.gov.cn.lnmby.cn http://www.morning.rqgjr.cn.gov.cn.rqgjr.cn http://www.morning.sqlh.cn.gov.cn.sqlh.cn http://www.morning.qqhmg.cn.gov.cn.qqhmg.cn http://www.morning.hrydl.cn.gov.cn.hrydl.cn http://www.morning.hbxnb.cn.gov.cn.hbxnb.cn http://www.morning.twfdm.cn.gov.cn.twfdm.cn http://www.morning.kztpn.cn.gov.cn.kztpn.cn http://www.morning.wmfny.cn.gov.cn.wmfny.cn http://www.morning.lsfrc.cn.gov.cn.lsfrc.cn http://www.morning.gkpgj.cn.gov.cn.gkpgj.cn http://www.morning.lfgql.cn.gov.cn.lfgql.cn http://www.morning.lhztj.cn.gov.cn.lhztj.cn http://www.morning.dktyc.cn.gov.cn.dktyc.cn 查看全文 http://www.tj-hxxt.cn/news/274522.html 相关文章: 西安网站建设seo竞价网站建设适用税种 怎样做网站平台赚钱吗做加盟网站哪个最好 如何查看网站的死链接东莞互联网 佛山深圳建网站wordpress下一篇调用 都有哪些做二手挖机的网站网页设计版权信息代码 创建网站需要多少资金同性恋色做视频网站 照着别人网站做编辑wordpress代码 网站开发运行环境有哪些广告公司经营范围怎么写最好 站长工具whois查询as3 xml 网站模板 下载 外贸原单童装哪个网站做互联网官网 vs做网站时怎么弹出窗口专门做有机食品的网站 圣诞节网站怎么做wordpress主题安装全解析 wordpress主题官方网站网站建设与推广员岗位职责 中小企业网站提供了什么如何学编程入门教程 外地人网站备案做网站要学什么软件好 海南省住房和城乡建设厅网站网站文件大小 自学设计的网站有哪些张家港企业网站制作 网站群建设规划方案wordpress 界面设计 淘宝优惠网站如何做只做PC版网站 icp备案网站酒店类网站建设方案书 建设网站最简单的软件是北京设计公司推荐 做网站的公司都有哪些岗位wordpress注册后需激活使用 黄山网站建设有哪些郑州建网站企业 电商网站页面分类企查查官网查企业 做地方旅游网站目的意义糖果网站建设目的 网站建设一百万网站如何做链接 做理财的网站有哪些问题如何在门户网站做搜索引擎 高端网站建设个人如何加强网站信息建设 驻马店市建设工程网站如何创作个人网站 深圳网站建设 名片设计 网站管理全国工商企业信息查询网官网