Skip to main content

Note on custom build legacy php, apache CentOS

https://stackoverflow.com/questions/979453/how-can-i-use-aliased-commands-with-xargs/979504
find -name \*bar\* | xargs bash -ic gi foo

It seem use bash function is easier.

I remember that I've create some function like this before, it look like this:

#DIRECTORY=$1
FILETYPE = $1
KEYWORD = $2

find . -name "*.FILETYPE" | xargs grep -rni KEYWORD $1
...

https://serverfault.com/questions/421161/how-to-configure-vsftpd-to-work-with-passive-mode

https://www.yanxurui.cc/posts/server/2017-03-21-NGINX-as-a-file-server/

https://serverfault.com/questions/807074/enable-password-login-for-sftp-while-keeping-authentication-by-ssh-keys

...
PasswordAuthentication no
...
Match user drupalsftp
    PasswordAuthentication yes



PasswordAuthentication no
...
Match user drupalsftp address 10.1.2.3/32
    PasswordAuthentication yes
    # also since we want only sftp
    ForceCommand internal-sftp


Err
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
...
yum clean metadata
yum clean all
yum update

=> Oh simple disable fastestmirror
/etc/yum/pluginconf.d/fastestmirror.conf

http://archive.kernel.org/centos-vault/5.11/isos/i386/

In order to conserve the limited bandwidth available .iso images are not downloadable from this Vault Machine.

The Following external Vault mirrors (not monitored by the CentOS Infra team !) provide direct downloads for all content, including isos:

USA:
http://archive.kernel.org/centos-vault/
rsync://archive.kernel.org::centos-vault/

Europe:
http://mirror.nsc.liu.se/centos-store/
rsync://mirror.nsc.liu.se::centos-store/


http://phpseclib.sourceforge.net/
use SFTP lib. it seem weird but have smth to learn like super compatible by absorb mcrypt available or not.

./configure --with-libdir=lib64 --with-apxs2=/usr/local/apache/bin/apxs --without-mysql --with-pgsql --enable-sigchild --enable-mbstring --enable-mbregex --enable-bcmath --with-mcrypt --enable-sockets --with-zlib --with-openssl
[--enable-ftp --with-curl] additon

Note that --with-libdir=lib64 since I mistaked use x64 version, it should be i386 instead.
uname -a to get

Enable curl without installing seem cool, not sure it work
https://serverfault.com/questions/437472/post-compiled-php-5-4-curl-installation

Restart apache after rebuild php, seem err
httpd: Syntax error on line 55 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: undefined symbol: SSL_CTX_set_options

https://stackoverflow.com/questions/2385735/php-error-libphp5-so-undefined-symbol-estrndup

Nothing but some useful apachectl command
https://stackoverflow.com/questions/27152943/how-can-i-view-the-complete-httpd-configuration
apachectl -S
show vhost...

apachectl -M

Yeah it seem configure httpd ly here
[root@goonetexchangedevel01 httpd-2.2.14]# cat config.nice
#! /bin/sh
#
# Created by configure

"./configure" \
"--prefix=/usr/local/apache" \
"--with-layout=Apache" \
"--enable-so" \
"--with-mpm=prefork" \
"--enable-headers" \
"--enable-rewrite" \
"--enable-ssl" \
"$@"

php52  -i |grep "Configure "
or php -i |grep "Configure"


https://tomthorp.me/blog/installing-custom-openssl-and-curl-legacy-php

Centos 5.11 have php5.3 and 5.1.6 (default ?). Try use 5.3
https://www.centos.org/forums/viewtopic.php?f=20&t=21793&sid=8ed638262f98f7e86c71129c56a35f8f&start=10


Vim disable new end of line  noeol.
With vim 7.4+ it seem can be setup on vimrc. Unfortunately my vim 7.0 too old so I have to make some more step.
vim -b file
:set noeol
:wq

A bit panic but complex setup seem not worth here.

It seem NAT only work with port forwarding as in PWG time.
http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html
Use NAT + hostonly for 2 way access. Only way beside Bridged ?


GIT middle man push error
remote: error: refusing to update checked out branch: refs/heads/BR_2019-41
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To /root/cent/goo-net-exchange
 ! [remote rejected] BR_2019-41 -> BR_2019-41 (branch is currently checked out)
error: failed to push some refs to '/root/cent/project-one'

 => Simple switch branch on remote (middleman Git dir). For me it is host Windows repo dir.
I pushed from guest ancient CentOS.

git co another-branch (host)
git push origin br-xxx (guest)
:)



yeah fuking yum
https://www.liquidweb.com/kb/enable-epel-repository/
https://archive.fedoraproject.org/pub/archive/epel/


https://serverfault.com/questions/437472/post-compiled-php-5-4-curl-installation

 

Comments

Popular posts from this blog

AWS Elasticache Memcached connection

https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/accessing-elasticache.html#access-from-outside-aws http://hourlyapps.blogspot.com/2010/06/examples-of-memcached-commands.html Access memcached https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/GettingStarted.AuthorizeAccess.html Zip include hidden file https://stackoverflow.com/questions/12493206/zip-including-hidden-files phpmemcachedadmin ~ phpMyAdmin or phpPgAdmin ... telnet mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com 11211 stats items stats cachedump 27 100 https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/VPCs.EC.html https://lzone.de/cheat-sheet/memcached VPC ID Security Group ID (sg-...) Cluster: The identifier for the cluster memcached1 Creation Time: The time (UTC) when the cluster was created January 9, 2019 at 11:47:16 AM UTC+7 Configuration Endpoint: The configuration endpoint of the cluster memcached1.ahgofe.cfg.usw1.cache.amazonaws.com:11211 St...

Notes Windows 10 Virtualbox config, PHP Storm Japanese, custom PHP, Apache build, Postgresql

 cmd => Ctrl + Shift + Enter mklink "C:\Users\HauNT\Videos\host3" "C:\Windows\System32\drivers\etc\hosts" https://www.quora.com/How-to-create-a-router-in-php https://serverfault.com/questions/225155/virtualbox-how-to-set-up-networking-so-both-host-and-guest-can-access-internet 1 NAT + 1 host only config https://unix.stackexchange.com/questions/115464/how-to-properly-set-up-2-network-interfaces-in-centos-running-in-virtualbox DEVICE=eth0 TYPE=Ethernet #BOOTPROTO=dhcp BOOTPROTO=none #IPADDR=10.9.11.246 #PREFIX=24 #GATEWAY=10.9.11.1 #IPV4_FAILURE_FATAL=yes #HWADDR=08:00:27:CC:AC:AC ONBOOT=yes NAME="System eth0" [root@localhost www]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 # Advanced Micro Devices, Inc. [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth1 IPADDR=192.168.56.28 <= no eff => auto like DHCP #GATEWAY=192.168.56.1 #BOOTPROTO=dhcp BOOTPROTO=static <= no eff ONBOOT=yes HWADDR=08:00:27:b4:20:10 [root@localhost www]# ...

Rocket.Chat DB schema

_raix_push_notifications avatars.chunks avatars.files instances meteor_accounts_loginServiceConfiguration meteor_oauth_pendingCredentials meteor_oauth_pendingRequestTokens migrations rocketchat__trash rocketchat_cron_history rocketchat_custom_emoji rocketchat_custom_sounds rocketchat_import rocketchat_integration_history rocketchat_integrations rocketchat_livechat_custom_field rocketchat_livechat_department rocketchat_livechat_department_agents rocketchat_livechat_external_message rocketchat_livechat_inquiry rocketchat_livechat_office_hour rocketchat_livechat_page_visited rocketchat_livechat_trigger rocketchat_message rocketchat_oauth_apps rocketchat_oembed_cache rocketchat_permissions rocketchat_raw_imports rocketchat_reports rocketchat_roles rocketchat_room rocketchat_settings rocketchat_smarsh_history rocketchat_statistics rocketchat_subscription rocketchat_uploads system.indexes users usersSessions https://rocket.chat/docs/developer-guides/sc...